filter_Datetime_multiple {LightLogR} | R Documentation |
Filter multiple times based on a list of arguments.
Description
filter_Datetime_multiple()
is a wrapper around filter_Datetime()
or
filter_Date()
that allows the cumulative filtering of Datetimes
based on
varying filter conditions. It is most useful in conjunction with the
only_Id
argument, e.g., to selectively cut off dates depending on
participants (see examples)
Usage
filter_Datetime_multiple(
dataset,
arguments,
filter_function = filter_Datetime,
...
)
Arguments
dataset |
A light logger dataset |
arguments |
A list of arguments to be passed to |
filter_function |
The function to be used for filtering, either
|
... |
Additional arguments passed to the filter function. If the
|
Value
A dataframe with the filtered data
Examples
arguments <- list(
list(start = "2023-08-17", only_Id = quote(Id == "Participant")),
list(end = "2023-08-17", only_Id = quote(Id == "Environment")))
#compare the unfiltered dataset
sample.data.environment %>% gg_overview(Id.colname = Id)
#compare the unfiltered dataset
sample.data.environment %>%
filter_Datetime_multiple(arguments = arguments, filter_Date) %>%
gg_overview(Id.colname = Id)