igrep function

case-insensitive grep

case-insensitive grep

igrep(..., ignore.case = TRUE)

Arguments

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

Returns

vector of matching indices

Details

This function is a simple wrapper around base::grep() which runs in case-insensitive mode. It is mainly used to save keystrokes, but is consistently named alongside vgrep and vigrep.

Examples

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

See Also

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

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