Re: [R] cumulate of snow cumulates from daily values of different automatic stations for some time intervals

2018-08-16 Thread Stefano Sofia
Hi Jim. Thank you for your help. I found very useful cum_snow and cum_list, but I decided to manage the list and dates in a different way. First of all I decided to deal with a unique data frame (called df_CFS) where I attached all the 10 data frames, and instead to build a list with the 10

Re: [R] cumulate of snow cumulates from daily values of different automatic stations for some time intervals

2018-08-12 Thread Jim Lemon
Hi Stefano, This was such a stinker of a problem that I just had to crack it: # create some data the lazy man's way year_dates<-c(paste(2000,rep("01",31),formatC(1:31,width=2,flag=0),sep="-"), paste(2000,rep("02",29),formatC(1:29,width=2,flag=0),sep="-"),

[R] cumulate of snow cumulates from daily values of different automatic stations for some time intervals

2018-08-10 Thread Stefano Sofia
Dear R-list users, I have 10 data frames (called df1, df2, ... df10), where each of them contains snow data from an automatic meteorological station (obviously each station has a different station code). Here is an example of df1: station_code date_factor date_POSIX snow 217 1999-12-15