Skip to content
Prev 378350 / 398502 Next

cumulative data monthly

Hello,

See if the following can get you started.
It uses package CRAN zoo, function as.yearmon.

dati$MES <- zoo::as.yearmon(dati$DATAORA)
PMES <- ave(dati$PREC, dati$MES, FUN = cumsum)

plot(dati$DATAORA, PMES)


Hope this helps,

Rui Barradas

?s 15:25 de 27/01/2019, Diego Avesani escreveu: