browseData {ProfoundData} | R Documentation |
A browse database function
Description
A function to provide information on available data in the PROFOUND database.
Usage
browseData(
dataset = NULL,
site = NULL,
location = NULL,
variables = FALSE,
collapse = TRUE
)
Arguments
dataset |
a character string providing the name of the dataset (optional). |
site |
a character string providing the name of the site (optional). |
location |
deprecated argument. Please use site instead. |
variables |
a boolean indicating whether to return the variables of a dataset, instead of the available sites. |
collapse |
a boolean indicating whether to return the compact (TRUE) or the extended (FALSE) data overview, if neither site nor dataset are passed to the function. |
Details
Besides providing information on available data, this function allows to access the database metadata, policy, data sources and site descriptions.
Value
if no arguments, an overview of available data
if metadata, the requested metadata
if dataset and variables, available variables for a dataset
if dataset, available sites for the dataset
if site, available datasets for a site
if site and dataset, returns an integer. Availability is coded as 0 = no available and 1 = available. This is the quickest option to check availability.
Note
To report errors in the package or the data, please use the issue tracker in the GitHub repository of ProfoundData https://github.com/COST-FP1304-PROFOUND/ProfoundData
Examples
# example requires that a sql DB is registered via setDB(dbfile)
# when run without a registered DB, you will get a file query (depending on OS)
## Not run:
# See available data of the database
overview <- browseData()
# Hint: If *collapse* FALSE, full version of the overview table
overview <- browseData(collapse = FALSE)
# Available datasets
tables <- browseData(dataset = "DATASETS")
# Available variables for a given dataset
variables <- browseData(dataset = "CLIMATE_LOCAL", variables = TRUE)
# Available sites for a given dataset
available <- browseData(dataset = "CLIMATE_LOCAL")
# Available datasets for a given site
available <- browseData(site ="le_bray")
# Whether a dataset is available for a specific site
available <- browseData(site ="le_bray", dataset = "CLIMATE_LOCAL")
# See version history
version <- browseData(dataset = "VERSION")
# See metadata
metadata <- browseData(dataset = "METADATA_DATASETS")
metadata <- browseData(dataset = "METADATA_CLIMATE_LOCAL")
# See metadata of a specific site
metadata <- browseData(dataset = "METADATA_TREE", site = "solling_spruce")
# See data source
source <- browseData(dataset = "SOURCE")
# See data source of a specific site
source <- browseData(dataset = "SOURCE", site = "solling_spruce")
# See data policy
source <- browseData(dataset = "POLICY")
# See data policy of a specific site
policy <- browseData(dataset = "POLICY", site = "solling_spruce")
## End(Not run)