Learn R Programming

easyr (version 0.3-1)

sch: Search a Data Frame.

Description

Searches all columns for a term and returns all rows with at least one match. Author: Bryce Chamberlain.

Usage

sch(x, pattern, ignore.case = FALSE, fixed = FALSE)

Arguments

x

Data to search.

pattern

Regex patter to search. Most normal search terms will work fine, too.

ignore.case

Ignore case in search (uses grepl).

fixed

Passed to grepl to match string as-is instead of using regex. See ?grepl.

Value

Matching rows.

Examples

Run this code
# NOT RUN {
sch( iris, 'setosa' )
# }

Run the code above in your browser using DataLab