Re: [R] aggregation of irregular interval time-series

2021-06-13 Thread Enrico Gabrielli
"fmach__feromoni___vibrazione")) > ) > > # calculates the cumulative capture by type of trap + farm > library(dplyr) > vindicta_catture_cimici = vindicta_catture_cimici %>% > group_by(trappola,azienda) %>% arrange(datetime) %>% mutate(cs = >

[R] with replace na with 0?

2021-06-11 Thread Enrico Gabrielli
Hello I almost got through the problem in post "aggregation of irregular interval time-series" I just don't understand how to fix that when I try '' with(datatable,ifelse(is.na(x),y,x)) '' if y is na replaces me with 0 and not with na Thank you -- Perito agra

Re: [R] aggregation of irregular interval time-series

2021-06-10 Thread Enrico Gabrielli
o not want to ask in ml the ready turnkey solution, but some ideas of what could be the set of packages and functions that could be right for me, and if anyone has been faced with such a problem. Thank you Enrico Gabrielli Il giorno mer, 09/06/2021 alle 14.47 -0700, Bert Gunter ha scritto: >

[R] aggregation of irregular interval time-series

2021-06-09 Thread Enrico Gabrielli
seems interesting to me with DTSg doing x_periodic <- alter(x,na.status = 'explicit',from="2021-05-15 12:00:00",by="min") colapply(x_periodic, fun = interpolateLinear) I managed to create a vector with all interpolated hours but with DTSg I still can't aggrega