filter_in_sub: Filter within nested data frames

filter_in_subR Documentation

Filter within nested data frames

Description

Applies filter within nested data frames.

Usage

filter_in_sub(
  df,
  data_col_name,
  ...,
  handle_nulls = FALSE,
  drop_empty = FALSE,
  scoped_in = TRUE
)

Arguments

df

A data frame / tibble

data_col_name

The column name of the nested data frames, bare or as a string.

...

Logical predicates defined in terms of the variables in df. Multiple conditions are combined with &. Only rows where the condition evaluates to TRUE are kept. See filter for more information.

handle_nulls

If TRUE, drops rows with NULL data frames. Otherwise will throw an error if they are encountered.

drop_empty

If TRUE, will drop rows that, after filtering, have no rows.

scoped_in

A boolean indicating whether the summary functions are scoped within the nested data frames alone (TRUE) or whether they also have access to the higher-level data frame. Changing this value can radically change the behavior.

Value

A data frame / tibble

See Also

filter_by_sub


burchill/zplyr documentation built on Feb. 2, 2023, 11:01 a.m.