unigrep: case-insensitive grep, returning unmatched indices

unigrepR Documentation

case-insensitive grep, returning unmatched indices

Description

case-insensitive grep, returning unmatched indices

Usage

unigrep(..., ignore.case = TRUE, invert = TRUE)

Arguments

..., ignore.case, invert

parameters sent to base::grep()

Details

This function is a simple wrapper around base::grep() which runs in case-insensitive mode, and returns unmatched entries. It is mainly used to save keystrokes, but is consistently named alongside vgrep and vigrep, and quite helpful for writing concise code.

Value

vector of non-matching indices

See Also

Other jam grep functions: grepls(), igrepHas(), igrepl(), igrep(), provigrep(), unvigrep(), vgrep(), vigrep()

Examples

V <- paste0(LETTERS[1:5], LETTERS[4:8]);
unigrep("D", V);
igrep("D", V);


jmw86069/jamba documentation built on Oct. 9, 2024, 10:52 a.m.