grepColEntries {rrMisc}R Documentation

Subset of data.frame containing string

Description

Get a subset of a data.frame with specified string in a given column.

Usage

grepColEntries(d.frame, col.name, part.name, ...)

Arguments

d.frame

data.frame

col.name

Name of column

part.name

Search string in column names

...

Arguments passed to further functions

Details

Unlike subset which works with '==' or '%in%', here search is performed using grep() in a fashion of 'like', meaning substrings are recognized.

Value

Subset of data.frame for which selection conditions are met.

Note

under continuous developement

Author(s)

Roland Rapold

References

none

See Also

grepColNames grepColNA grepObjNames grepNotCompleteEntries grepMultipleEntries grepRowNames grepColNegNum grepColFactors

Examples

if(require("MASS"))
{
    data(crabs, package="MASS")
    print(head(grepColEntries(crabs, "sex", "M")))
    print(head(grepColEntries(crabs, "index", "2")))
}

[Package rrMisc version 0.31 Index]