Apply filter based on a statement, scoped to dplyr groups

filter_scoped(dframe, statement, scope_at = NULL)

Arguments

dframe

data.frame/tbl, grouped or ungrouped

statement

character, statement for filtering (only VALID expressions; use check_individual_statement to grab only valid.

scope_at

numeric, group indices to apply filter statements to

Value

List, containing item filtered_df, a data.frame filtered based on statements and scope.