aggregateClimate: Aggregate climate parameters in time and by station

Description Usage Arguments Value Author(s) See Also Examples

Description

Aggregate climate parameters in time and by station

Usage

1
aggregateClimate(dat, dts, plotID, variable, fun, agg = "month")

Arguments

dat

data.frame including Dates, climate parameters for different plots

dts

Character. Indicates which column of dat includes the Dates

plotID

Character. Indicates which column of dat includes the Plot identifier

variable

Character. Indicates which column of dat includes the variable to be aggregated

fun

Character. How to aggregate the data. e.g. "mean" or "sum".

agg

Character. defines the aggregation level. Either "week","month" or "year"

Value

A data.frame with aggregated climate information

Author(s)

Hanna Meyer

See Also

GDD

Examples

1
2
3
4
#Calculate GDD from MODIS day/night data for several plots and aggregate it per month
dat <- get(load(system.file("extdata","ClimateData.RData",package="metTools")))
dat$GDD <- GDD(tmax=dat$tday,tmin=dat$tnight)
GDD_agg <- aggregateClimate(dat,"Date","Plot","GDD","sum")

environmentalinformatics-marburg/metTools documentation built on May 26, 2019, 3:31 a.m.