library(dplyr)
library(lubridate)
# data
data('ARG_TRE', package = 'sapfluxnetr')
# by timestamp
foo_timestamp <- get_timestamp(ARG_TRE)
foo_timestamp_trimmed <- foo_timestamp[1:100]
sfn_filter(
ARG_TRE,
TIMESTAMP %in% foo_timestamp_trimmed
)
# by wind speed value
ws_threshold <- 25
sfn_filter(
ARG_TRE,
ws <= ws_threshold
)
## multi
data('ARG_MAZ', package = 'sapfluxnetr')
multi_sfn <- sfn_data_multi(ARG_TRE, ARG_MAZ)
# by timestamp
sfn_filter(
multi_sfn,
between(day(TIMESTAMP), 18, 22)
)
# by wind speed value
sfn_filter(
multi_sfn,
ws <= ws_threshold
)
Run the code above in your browser using DataLab