igrepl function

case-insensitive logical grepl

case-insensitive logical grepl

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

Arguments

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

Returns

logical vector indicating pattern match

Details

This function is a simple wrapper around base::grepl() which runs in case-insensitive mode simply by adding default ignore.case=TRUE. It is mainly used for convenience.

Examples

V <- paste0(LETTERS[1:5], LETTERS[4:8]); ig1 <- grepl("D", V); ig2 <- igrepl("D", V); ig3 <- grepl("d", V); ig4 <- igrepl("d", V); data.frame(V, grepl_D=ig1, grepl_d=ig3, igrepl_D=ig2, igrepl_d=ig4);

See Also

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

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