filter_table: Exclude table dimenions by matching values.

View source: R/table_utils.R

filter_tableR Documentation

Exclude table dimenions by matching values.

Description

Subset table to exclude rows/columns that match a specific value.

Usage

filter_table(data, dimension, by, pattern, trim_whitespace = T)

Arguments

data

Data frame to subset.

dimension

The dimension from which to pull values for matching. '1' for rows and '2' for columns. The dimension not specified is the one that will be reduced in length.

by

The row/column name or index to use to pull values for matching.

pattern

The pattern to match against. Can be any fixed string, NA, or NULL values.

trim_whitespace

If TRUE, remove leading and trailing whitespace from values to match.

Details

Uses a user-specified row or column to find matches to a user-specified value. For matches on a row, corresponding columns are removed. For matches on a column, corresponding rows are removed.

Value

A data frame with one of the dimensions reduced to exclude rows/columns that match against the user-specified value.


bryancquach/omixjutsu documentation built on Jan. 29, 2023, 3:47 p.m.