read_db | R Documentation |
Reads, aggregates, and processes the SQLite database
(data/geelite.db
).
read_db(
path,
variables = "all",
freq = c("month", "day", "week", "bimonth", "quarter", "season", "halfyear", "year"),
prep_fun = NULL,
aggr_funs = function(x) mean(x, na.rm = TRUE),
postp_funs = NULL
)
path |
[mandatory] (character) Path to the root directory of the generated database. |
variables |
[optional] (character or integer) Names or IDs of the
variables to be read. Use the |
freq |
[optional] (character) The frequency for data aggregation.
Options include |
prep_fun |
[optional] (function or |
aggr_funs |
[optional] (function or list) A function or a list of
functions for aggregating data to the specified frequency ( |
postp_funs |
[optional] (function or list) A function or list of
functions applied to the time series data of a single bin after
aggregation. Users can directly refer to variable names or IDs. The
default is |
A list where the first element (grid
) is a simple feature
(sf) object, and subsequent elements are data frame objects corresponding
to the variables.
# Example: Reading variables by IDs
## Not run:
db_list <- read_db(path = "path/to/db",
variables = c(1, 3))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.