case-insensitive grep

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

Arguments

..., ignore.case

parameters sent to base::grep()

Value

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.

See also

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

Examples

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