Hi!
I am working with Spatiotemporal datasets and I am trying to figure out the way how to filter data. I am working with package Stars. My dataset looks like this :
poll <- read_stars("ecmwf/data/so2_co/pm_mar2006_0-6-12-18.nc")
stars object with 3 dimensions and 1 attribute
attribute(s), summary of first 1e+05 cells:
so2 [kg/kg]
Min. :2.067e-24
1st Qu.:2.110e-24
Median :2.140e-24
Mean :2.207e-24
3rd Qu.:2.233e-24
Max. :2.968e-24
dimension(s):
from to offset delta refsys point values
x 1 701 11.995 0.01 +proj=longlat +datum=WGS8... NA NULL [x]
y 1 311 51.505 -0.01 +proj=longlat +datum=WGS8... NA NULL [y]
time 1 124 2006-03-01 UTC 6 hours POSIXct NA NULL
For every day I have two values in the data set (at 6am, at12pm). What i am trying to do is to filter data only for 6am.
I figured out one way, but it's not very handy, if I will have more data in the future.
poll %>% slice("time",seq(1,124,2))
Can anyone advice me easier way how to do it?
Thanks !