states <-
sample.data.environment |>
filter_Date(length = "1 day") |>
extract_states(Daylight, MEDI > 1000)
states |> head(2)
#add states to a dataset and plot them - as we only looked for states on the
# first day (see above), only the first day will show up in the plot
sample.data.environment |>
filter_Date(length = "2 day") |>
add_states(states) |>
gg_days() |>
gg_state(Daylight)
Run the code above in your browser using DataLab