I was using a mix of rollingMean and timeAverage function, and this make me think that the function should be inside of the timeAverage. One of the benefits of this change is the use of the type inside of rolling mean.
df8h<-data.frame()
for(station in unique(p$cod.est)){
df8h<-p%>%
filter(cod.est==station)%>%
rollingMean(pollutant='DatoValidado',new.name = "DatoValidado")%>%
bind_rows(df8h)
}
Hi, hope everyone is doing well.
I was using a mix of rollingMean and timeAverage function, and this make me think that the function should be inside of the timeAverage. One of the benefits of this change is the use of the type inside of rolling mean.
df8h<-data.frame()
for(station in unique(p$cod.est)){ df8h<-p%>% filter(cod.est==station)%>% rollingMean(pollutant='DatoValidado',new.name = "DatoValidado")%>% bind_rows(df8h) }
p<-df8h%>% timeAverage(avg.time = 'day',data.thresh = 75, statistic = 'max',type=c('cod.est','contaminante'))%>% timeAverage(avg.time = 'year',data.thresh = 75,statistic = 'percentile',percentile=percentile,type=c('cod.est','contaminante'))