mc_calc_cumsum {myClim} | R Documentation |
Cumulative sum
Description
This function creates a new virtual sensor on locality within the myClim data object.
The virtual sensor represents the cumulative sum of the values on the input sensor.
Names of new sensors are original sensor name + outpus_suffix
.
Usage
mc_calc_cumsum(data, sensors, output_suffix = "_cumsum", localities = NULL)
Arguments
data |
cleaned myClim object see myClim-package |
sensors |
names of sensors on which to calculate cumulative sum |
output_suffix |
name suffix for virtual sensor names (default "_cumsum") e.g. TMS_T3_cumsum |
localities |
list of locality_ids for calculation; if NULL then all (default NULL) |
Details
If value type of sensor is logical, then output type is integer. (TRUE, TRUE, FALSE -> 2)
Value
The same myClim object as input but with added cumsum sensors.
Examples
cumsum_data <- mc_calc_cumsum(mc_data_example_agg, c("TMS_T1", "TMS_T2"))
[Package myClim version 1.1.0 Index]