Description Usage Arguments Value Author(s) See Also Examples
Aggregate climate parameters in time and by station
1 | aggregateClimate(dat, dts, plotID, variable, fun, agg = "month")
|
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" |
A data.frame with aggregated climate information
Hanna Meyer
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.