if (FALSE) {
# set path to file
path <- system.file('extdata', 'ianigla_cuevas.csv',
package = 'hydrotoolbox')
# read the file and add the new column with cumulative precipitation
cuevas <-
read_ianigla(path = path) %>%
cum_sum(col_name = 'Precip_Total', out_name = 'p_cum')
# plot it
plot(x = cuevas[ , 'date', drop = TRUE],
y = cuevas[ , 'p_cum', drop = TRUE],
col = 'red', type = 'l',
xlab = 'Date', ylab = 'Pcum(mm)')
}
Run the code above in your browser using DataLab