vigrep function

case-insensitive grep, returning values

case-insensitive grep, returning values

vigrep(..., value = TRUE, ignore.case = TRUE)

Arguments

  • ..., value, ignore.case: parameters sent to base::grep()

Returns

vector of matching values

Details

This function is a simple wrapper around base::grep() which runs in case-insensitive mode, and returns matching values. It is particularly helpful when grabbing values from a vector.

Examples

V <- paste0(LETTERS[1:5], LETTERS[4:8]); vigrep("d", V);

See Also

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

  • Maintainer: James M. Ward
  • License: MIT + file LICENSE
  • Last published: 2025-03-23