Filter dataset based on slope selections and exclusions
Source:R/utils-slope_selector.R
filter_slopes.RdThis function filters main dataset based on provided slope selections an exclusions.
Arguments
- data
Data to filter. Must be
PKNCAdatalist, containing theconcelement withPKNCAconclist and appropriate data frame included under data.- slopes
A data frame containing slope rules, including
TYPE,RANGE, andREASONcolumns. May also have grouping columns (expected to match slope_groups)- profiles
List with available profiles for each
SUBJECT.- slope_groups
List with column names that define the groups.
- check_reasons
Whether to check if all selections have REASONS stated. If this is
TRUEand not all selections have a reason provided, an error will be thrown.