Provides a cumulative sum of rain gauge data while excluding NA
values.
Usage
cumsumNA(x, ...)
# S3 method for data.table
cumsumNA(x)
# S3 method for HydroImport
cumsumNA(x)
# S3 method for HydroAggs
cumsumNA(x)
# S3 method for numeric
cumsumNA(x)
Arguments
- x
Raw rain gauge data or merged dataset
- ...
Additional parameters as required
Value
A cumulative sum of rain gauge data
Examples
data(chesterton)
# Apply cumulative sum
dt <- cumsumNA(chesterton)
plot(dt$dateTime,
dt$cumSum,
main = "Cumulative rainfall plot for Chesterton Gauge (WISKI: 164163)",
xla = "Date Time",
ylab = "Cumulative rainfall (mm)",
type = "l")