This function is deprecated and it's likely going to be dropped in the next release cycle.
Filter a single data frame or a list of data frames with custom predicates assembled from the function parameters.
Arguments
- x
A data frame or a list of data frames
- threshold
A numeric/integer vector or a named list of numeric/integer vectors
- cols_to_compare
A character vector or a named list of character vectors
- comparators
A character vector or a named list of character vectors. Must be one of the allowed values between
c("<", ">", "==", "!=", ">=", "<=")
See also
Other Data cleaning and pre-processing:
aggregate_metadata()
,
aggregate_values_by_key()
,
compute_near_integrations()
,
default_meta_agg()
,
outlier_filter()
,
outliers_by_pool_fragments()
,
purity_filter()
,
realign_after_collisions()
,
remove_collisions()
Examples
if (FALSE) {
example_df <- tibble::tibble(
a = c(20, 30, 40),
b = c(40, 50, 60),
c = c("a", "b", "c"),
d = c(3L, 4L, 5L)
)
example_list <- list(
first = example_df,
second = example_df,
third = example_df
)
filtered <- threshold_filter(example_list,
threshold = list(
first = c(20, 60),
third = c(25)
),
cols_to_compare = list(
first = c("a", "b"),
third = c("a")
),
comparators = list(
first = c(">", "<"),
third = c(">=")
)
)
filtered
}