browseData: A browse database function

Description Usage Arguments Details Value Note Examples

View source: R/browseData.R

Description

A function to provide information on available data in the PROFOUND database.

Usage

1
2
3
4
5
6
7
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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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)

ProfoundData documentation built on March 31, 2020, 5:24 p.m.