str_which_unique: Keep strings uniquely matching a pattern, or find positions.

View source: R/stringrx.R

str_which_uniqueR Documentation

Keep strings uniquely matching a pattern, or find positions.

Description

These are wrappers for 'stringr::str_subset' and 'stringr::str_which' that facilitate all-vs-all matching of multiple strings against multiple patterns, and require matches to be unique across patterns.

Usage

str_which_unique(strings, patterns, require_match = FALSE)

str_subset_unique(strings, patterns, require_match = FALSE)

Arguments

strings

a vector of characters

patterns

a vector of patterns

require_match

for each pattern or throw an error


thackl/thacklr documentation built on Oct. 16, 2023, 9:15 p.m.