Description Usage Arguments Details Value Methods (by class) Examples
Read an eBird Basic Dataset file using data.table::fread()
,
readr::read_delim()
, or read.delim depending on which packages are
installed. read_ebd()
reads the EBD itself, while read_sampling()' reads a
sampling event data file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | read_ebd(x, reader, sep, unique, setclass)
## S3 method for class 'character'
read_ebd(x, reader, sep = "\t", unique = TRUE,
setclass = c("tbl", "data.frame", "data.table"))
## S3 method for class 'auk_ebd'
read_ebd(x, reader, sep = "\t", unique = TRUE,
setclass = c("tbl", "data.frame", "data.table"))
read_sampling(x, reader, sep, unique, setclass)
## S3 method for class 'character'
read_sampling(x, reader, sep = "\t", unique = TRUE,
setclass = c("tbl", "data.frame", "data.table"))
## S3 method for class 'auk_ebd'
read_sampling(x, reader, sep = "\t", unique = TRUE,
setclass = c("tbl", "data.frame", "data.table"))
|
x |
filename or |
reader |
character; the function to use for reading the input file,
options are |
sep |
character; single character used to separate fields within a row. |
unique |
logical; should duplicate grouped checklists be removed. If
|
setclass |
|
This functions performs the following processing steps:
Data types for columns are manually set based on column names used in the February 2017 EBD. If variables are added or names are changed in later releases, any new variables will have data types inferred by the import function used.
Variables names are converted to snake_case
.
Duplicate observations resulting from group checklists are removed using
auk_unique()
, unless unique = FALSE
.
A data.frame
with additional class tbl
unless setclass
is used,
in which case a standard data.frame
or data.table
can be returned. An
additional column, checklist_id
, is added to output files if
unique = TRUE
, that uniquely identifies the checklist from which the
observation came. This field is equal to sampling_event_identifier
for
non-group checklists, and group_identifier
for group checklists.
character
: Filename of EBD.
auk_ebd
: auk_ebd
object output from auk_filter()
character
: Filename of sampling event data file
auk_ebd
: auk_ebd
object output from auk_filter()
. Must have
had a sampling event data file set in the original call to auk_ebd()
.
1 2 3 4 5 6 7 8 | ebd <- system.file("extdata/ebd-sample.txt", package = "auk") %>%
read_ebd()
# optionally return a plain data.frame
ebd_df <- system.file("extdata/ebd-sample.txt", package = "auk") %>%
read_ebd(setclass = "data.frame")
# read a sampling event data file
x <- system.file("extdata/zerofill-ex_sampling.txt", package = "auk") %>%
read_sampling()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.