calculateAttributes: Calculates the attributes of the hydroclimate time series

Description Usage Arguments Value See Also Examples

View source: R/attributeCalculator.R

Description

calculateAttributes calculates the specified attributes of the input daily hydroclimate time series.

Usage

1
calculateAttributes(climateData, attSel, startYr = NULL, endYr = NULL)

Arguments

climateData

data.frame; daily climate data, the attributes of which are to be calculated. climateData should be a data.frame with columns named year month day *variable_name1* *variable_name2*. Use viewModels() to view the valid variable names. Note that the first three columns of the data.frame contain the year, month, and day of the data. The columns have to be named as specified. Please refer data provided with the package that may be loaded using data(tankDat) for an example of the expected format of climateData.

attSel

a vector; specifying the names of the attributes to be calculated.

startYr

a number (default NULL); to specify the starting year to subset climateData if required. If NULL, startYr is starting year in the input climateData.

endYr

a number (default NULL); to specify the ending year to subset climateData if required. If NULL, endYr is last year in the input climateData.

Value

The function returns a vector of length equal to the number of selected attributes (attSel), named using the names of the attributes.

See Also

viewAttributes, viewAttributeDef

Examples

1
2
3
4
5
6
# view the names of available attributes
viewAttributes()
# load example climate data available in the package
data("tankDat")
attSel <- c("P_ann_tot_m", "P_ann_nWet_m", "P_ann_R10_m", "Temp_ann_rng_m", "Temp_ann_avg_m")
tank_obs_atts <- calculateAttributes(tank_obs, attSel = attSel)

foreSIGHT documentation built on Dec. 17, 2020, 5:10 p.m.