grepall: grep string for all columns of type character

View source: R/grepall.R

grepallR Documentation

grep string for all columns of type character

Description

grep string for all columns of type character

Usage

grepall(dataframe, string, print_values = FALSE, ...)

Arguments

dataframe

Object of class data.frame

string

Character. Specify string to search for

print_values

Logical. Choose wether to print values.

...

further arguments passed to grep

Examples

testdata <- data.frame(a = c(1, "?"), b = 1:2, C = c("?", "?"), d = c("?", "a"), stringsAsFactors = FALSE)
index <- which(as.matrix(testdata) == "?", arr.ind = TRUE)
testdata[index]

sachserf/sf documentation built on June 8, 2024, 4:23 p.m.