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
.
mc_calc_cumsum(data, sensors, output_suffix = "_cumsum", localities = NULL)
cleaned myClim object see myClim-package
names of sensors on which to calculate cumulative sum
name suffix for virtual sensor names (default "_cumsum") e.g. TMS_T3_cumsum
list of locality_ids for calculation; if NULL then all (default NULL)
The same myClim object as input but with added cumsum sensors.
If value type of sensor is logical, then output type is integer. (TRUE, TRUE, FALSE -> 2)
cumsum_data <- mc_calc_cumsum(mc_data_example_agg, c("TMS_T1", "TMS_T2"))