Exotic codes are applied to eBird observations when the species is believe to
be non-native to the given location. This function defines a filter for the
eBird Basic Dataset (EBD) to subset observations to one or more of the exotic
codes: "" (i.e. no code, meaning it is a native species), "N" (naturalized),
"P" (provisional), or "X" (escapee). This function only defines the filter
and, once all filters have been defined, auk_filter() should be used to
call AWK and perform the filtering.
Arguments
- x
auk_ebdorauk_samplingobject; reference to file created byauk_ebd()orauk_sampling().- exotic_code
characterr; exotic codes to filter by. Note that an empty string (""), meaning no exotic code, is used for native species.
- replace
logical; multiple calls to
auk_exotic()are additive, unlessreplace = FALSE, in which case the previous list of states to filter by will be removed and replaced by that in the current call.
Examples
# filter to only native observations
ebd <- auk_ebd(system.file("extdata/ebd-sample.txt", package = "auk"))
auk_exotic(ebd, exotic_code = "")
#> Input
#> EBD: /github/home/R/x86_64-pc-linux-gnu-library/4.5/auk/extdata/ebd-sample.txt
#>
#> Output
#> Filters not executed
#>
#> Filters
#> Species: all
#> Countries: all
#> States: all
#> Counties: all
#> BCRs: all
#> Bounding box: full extent
#> Years: all
#> Date: all
#> Start time: all
#> Last edited date: all
#> Protocol: all
#> Project code: all
#> Duration: all
#> Distance travelled: all
#> Records with breeding codes only: no
#> Exotic Codes: Native
#> Complete checklists only: no
# filter to native and naturalized observations
auk_exotic(ebd, exotic_code = c("", "N"))
#> Input
#> EBD: /github/home/R/x86_64-pc-linux-gnu-library/4.5/auk/extdata/ebd-sample.txt
#>
#> Output
#> Filters not executed
#>
#> Filters
#> Species: all
#> Countries: all
#> States: all
#> Counties: all
#> BCRs: all
#> Bounding box: full extent
#> Years: all
#> Date: all
#> Start time: all
#> Last edited date: all
#> Protocol: all
#> Project code: all
#> Duration: all
#> Distance travelled: all
#> Records with breeding codes only: no
#> Exotic Codes: Native, Naturalized
#> Complete checklists only: no
