ed_table: Load PREDICT-1 EIDITH data from the local database

View source: R/tables.R

ed_table_R Documentation

Load PREDICT-1 EIDITH data from the local database

Description

These functions load data from the locally-stored SQLite database of downloaded and cleaned EIDITH data. ed_table is a general function, and ed_table_ it's standard evaluation equivalent, useful for programming. The other functions are convenience aliases for the individual tables. Alternate versions return mock data 'ed_mock()“ for tutorials and practice.

Usage

ed_table_(table, ..., .dots)

ed_table(table, ...)

ed_events(...)

ed_animals(...)

ed_specimens(...)

ed_tests(...)

ed_testspecimen(...)

Arguments

table

one of the EIDITH PREDICT-1 or PREDICT-2 database tables.

...

arguments passed to dplyr::filter() to subset data

.dots

standard-evaluation versions of subsetting arguments

Details

These functions take dplyr::filter() arguments to sub-set the data. Using these, the data is subsetted via SQL before it is loaded into memory. For large tables, such as the tests table, this is useful for reducing the memory footprint of your R session.

Note that subsetting in SQL is more limited:

  • Use 0 or 1 instead of TRUE or FALSE

  • Dates are stored as character strings, but as they are in YYYY-MM-DD format, filtering such as event_date > "2014-01-01" still works.

Value

a tibble-style data frame.


ecohealthalliance/eidith documentation built on Aug. 30, 2022, 7:45 a.m.