Retrieve data associated with one or more sites, variables, and result types

db_get_results(db, site_code = NULL, variable_code = NULL,
  result_type = c("sample", "ts", "measurement"))

Arguments

db

database connection object

site_code

a string vector with codes of sites to get data for. default NULL returns all sites. Use get_site_codes function to browse codes with shiny gadget

variable_code

a string vector with codes of variables to get data for. default NULL returns all variables. Use get_variable_codes function to browse codes with shiny gadget

result_type

a string vector of result types to include: "ts" for time series results, "sample" for sample-based results, "measurement" for measurements

Value

a named list of dataframes corresponding to each result type.

Examples

# db_get_results(db, result_type = "ts")