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_ebd
orauk_sampling
object; 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.
See also
Other filter:
auk_bbox()
,
auk_bcr()
,
auk_breeding()
,
auk_complete()
,
auk_country()
,
auk_county()
,
auk_date()
,
auk_distance()
,
auk_duration()
,
auk_extent()
,
auk_filter()
,
auk_last_edited()
,
auk_observer()
,
auk_project()
,
auk_protocol()
,
auk_species()
,
auk_state()
,
auk_time()
,
auk_year()
Examples
# filter to only native observations
ebd <- auk_ebd(system.file("extdata/ebd-sample.txt", package = "auk"))
auk_exotic(ebd, exotic_code = "")
#> Input
#> EBD: /usr/local/lib/R/site-library/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: /usr/local/lib/R/site-library/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