summarizeData: A function to summarize data from the database

Description Usage Arguments Details Value Summary values Note Examples

View source: R/summarizeData.R

Description

This function allows to summarize datasets for a site from the PROFOUND database.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
summarizeData(
  dataset,
  site,
  location = NULL,
  forcingDataset = NULL,
  forcingCondition = NULL,
  by = "year",
  period = NULL,
  mode = "data"
)

Arguments

dataset

a character string providing the name of a climatic dataset (CLIMATE_LOCAL, CLIMATE_ISIMIP, ...) or the tree dataset.(change this you )

site

a character string providing the name of a site.

location

deprecated argument. Please use site instead.

forcingDataset

a character string providing the name of a forcingDataset. Only relevant for ISIMIP datasets.

forcingCondition

a character string providing the name of a forcingCondition. Only relevant for ISIMIP datasets.

by

a character string indicating how to summarize the data. Currently supports by year and total. The latter refers to the entire available period.

period

a character array with either start or start and end of the subset. It must have the format "YYYY-MM-DD", or c("YYYY-MM-DD", "YYYY-MM-DD").

mode

a character string indicating whether to display the data summary (data) or an overview (overview).

Details

This function is under development and has limited functionality. At the moment, it is possible to summarize daily climate datasets and tree data.

Data are summarized by years. Radiation and precipitation are provided as total yearly values, while the rest of climatic values are year mean values. For ISIMIP datasets a summary for whole period will be returned if the dataset comprises more than one forcing dataset and one forcing condition.

Value

a data frame with the summary values

Summary values

Summary is calculated by year

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
# 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: 
# Summarize by years
data <-summarizeData(dataset =  "TREE", site = "bily_kriz", by = "year",
                     mode = "data")
data <-summarizeData(dataset =  "CLIMATE_LOCAL", site = "bily_kriz", by = "year",
                     mode = "data")
data <-summarizeData(dataset =  "CLIMATE_ISIMIP2A", site = "bily_kriz", by = "year",
                     mode = "data")

# Specify forcing dataset or condition
data <-summarizeData(dataset ="CLIMATE_ISIMIP2B", site ="soro",
                     forcingDataset="GFDLESM2M", forcingCondition ="rcp2p6")


# Summarize total period
data <-summarizeData(dataset =  "TREE", site = "bily_kriz", by = "total",
                     mode = "data")
data <-summarizeData(dataset =  "CLIMATE_LOCAL", site = "bily_kriz", by = "total",
                     mode = "data")

# Summarize overview
data <-summarizeData(dataset =  "CLIMATE_LOCAL", site = "bily_kriz", mode = "overview")
data <-summarizeData(dataset =  "FLUX", site = "bily_kriz", mode = "overview")
data <-summarizeData(dataset =  "TREE", site = "bily_kriz", mode = "overview")
data <-summarizeData(dataset =  "STAND", site = "bily_kriz", mode = "overview")

## End(Not run)

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