Takes a dataset and an endpoint group specification, and it defines the expanded endpoint specifications. It creates metadata and filter strings for each endpoint group, which are used to subset the data accordingly. The function ensures that each endpoint group has the necessary information for further analysis.
Arguments
- x
A
data.table
containing the data associated with the endpoints.- group_by
A list specifying the grouping for endpoints, where each element corresponds to a variable used for grouping endpoints and contains the levels for that grouping variable.
- forced_group_levels
data.table (optional). Table with group levels that must be included in the expansion, regardless of
group_by
.- col_prefix
A prefix used to create the names of the metadata and filter columns in the output
data.table
. Defaults to "endpoint_group".