View source: R/ProxyDataManager.R
load_set | R Documentation |
Load dataset(s) from a ProxyDataManager
load_set(x, ...)
mng |
ProxyDataManager |
dataset_names |
character, single or vector of datasets to load. See Details |
proxy_names |
character, single or vector of proxies to load. See Details. |
output_format |
character, one of c('Proxytibble', 'tibble'). 'tibble' corresponds to 'tibble::tibble' |
zoo_format |
character, one of c('zoo', 'zoo_STACY'). format of the proxy data. See Details and ‘vignette(’zoo-support-sdm')'. |
only_mandatory_attr |
logical, defaults 'FALSE', only return the mandatory meta data in the output |
RDS_root |
character, root directory for pre-formatted .RDS data. See Details for more. |
force_file |
logical, if TRUE forces to load all 'dataset_names' from file and to recreate the corresponding RDS caches. |
dataset(s) in specified format
If loading by 'dataset_names' only, datasets will be loaded either from file or from cache and returned in format 'output_format'. If 'proxy_names' are additionally supplied, the datasets 'dataset_names' are filtered for respective proxies and the filtered data will be returned. This is only possible if datasets have previously been cached to RDS. If only 'proxy_names' is specified all available datasets which contain those proxies will be filtered and returned. Again, this works only on datasets which have previously been cached to RDS.
Datasets are always cached to RDS and meta data entries are written if they are loaded for the first time. This can be triggered when
supplying the respective 'dataset_names' to load_set
or to cache_RDS
.
If directory specified as RDS_root
does not exist, will try to create it simply (i.e. non-recursively).
Throws an error if RDS_root
cannot be created in this way. In this case check the path you submitted and
potentially create the necessary directories. This functionality is kept rudimentary by intention to avoid
filling storage spaces unintentionally.
zoo_format
is ignored if output_format == 'tibble'
because proxy data as 'zoo::zoo'/'PTBoxProxydata::zoo_STACY' objects is only
supported by 'PTBox' inside the 'PTBoxProxydata::Proxytibble' conventions.
## Not run: # create a ProxyDataManager instance mng <- ProxyDataManager() # load the icecore_data with default options icecore_data <- load_set(mng, dataset_names = 'icecore_data') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.