aggregateSubannual.uncompiled: Sub-annual aggregation

View source: R/aggregateSubannual.R

aggregateSubannual.uncompiledR Documentation

Sub-annual aggregation

Description

Aggregates data with sub-annual time resolution to a coarser time resolution. For example, going from monthly to annual.

Usage

aggregateSubannual.uncompiled(
  x,
  method = "mean",
  target = "Year",
  verbose = FALSE
)

Arguments

x

data.table or Field

method

A character string describing the method by which to aggregate the data. Can currently be "mean", "mode", "median", "sum", "max", "min", "sd", "var" and "cv" (= coefficient of variation sd/mean). For technical reasons these need to be implemented in the package in the code however it should be easy to implement more, please just contact the author!

target

A character string defining the subannual period to which the data should be aggregate. Can be "Month", "Season" or "Year" (also "Annual" is valid). Default is year.

verbose

If TRUE give some progress update about the averaging.

Input data can be a Field or data.table with appropriate columns.

Value

A Field or data.table depending on the input object

Author(s)

Matthew Forrest matthew.forrest@senckenberg.de


MagicForrest/DGVMTools documentation built on Aug. 23, 2024, 8:05 a.m.