match_partition: Match rows per group

Description Usage Arguments

View source: R/backend_functions.R

Description

This function accepts a dataframe, regex-pattern and column name for definitions, and return matching rows The function is meant to be called from match_rows, due to quosures it wont work standalone. It is, however, fairly simple to call this from another wrapper function as long as it takes care of quoting.

Usage

1
2
match_partition(df, definitions, rx, all_nicks, match_name = NULL,
  keep_all_rows = FALSE)

Arguments

df

Sorted dataframe to filter (this will often be a partition from a group_by statement)

definitions

Column containing the definition of rows

rx

Simple regex-like statement to filter for - quoted.

all_nicks

All unique elements in 'definitions' column

match_name

Optional column name for match-number, defaults to NULL.

keep_all_rows

Boolean allows you to return all rows, uncluding nonmatching rows. Meaninless if not match_name is set. Default FALSE.


radbrt/rowpatternmatcher documentation built on Nov. 5, 2019, 2:07 a.m.