pplr_get_data: Download data from the popler database

Description Usage Arguments Details Value Examples

View source: R/get_data.R

Description

This function downloads LTER studies contained in the popler database. The user can download data directly, using a logical expression, or using objects created by 'browse'.

Usage

1
2
pplr_get_data(..., add_vars = NULL, subtract_vars = NULL,
  cov_unpack = FALSE)

Arguments

...

An object produced by browse, a logical expression, or both. This can only accept one of each at a time currently.

add_vars

A string to specify which variables the user wants to add to the default variables used in a query. See Details for list of default variables.

subtract_vars

A string to specify which, among the default variables, the user wishes to discard in queries to the database. See Details for list of default variables.

cov_unpack

Should covariates be unpacked? This argument uses function 'cov_unpack' to extract the variables contained in the variable 'covariates', and combine the new columns with the default output.

Details

. By default, the following variables are included when a user calls pplr_get_data().

Value

This data fame is of class get_data, and data.frame.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# browse a study, then get the data associated with it
parasite = pplr_browse(proj_metadata_key == 25)
gh_data = pplr_get_data(parasite)

# further subset this data set, based on year
gh_data_96_99 = pplr_get_data(parasite, year > 1995 & year < 2000)

# insect data sets from the SEV lter site
insect_sev = pplr_browse(class == "Insecta" & lterid == "SEV")
insect_25_yrs96_99 = pplr_get_data(insect_sev, year > 1995 & year < 2000)

insect_21_25 = pplr_get_data((proj_metadata_key == 43 | 
                              proj_metadata_key == 25) & 
                              year < 1995 )

## End(Not run)

AldoCompagnoni/poplerr documentation built on Oct. 1, 2018, 3:06 p.m.