grep_df_subset: Internal function to remove search and remove columns based...

Description Usage Arguments Value Examples

View source: R/grep_df_subset.R

Description

grep_df_subset is an internal function that subsets a data frame based on supplied pattern. This function is provided in case it is found useful.

Usage

1
grep_df_subset(x, toMatch)

Arguments

x

data frame where columns are to be removed

toMatch

vector of characters to remove from x

Value

A subset of a genotypeR object

Examples

1
2
3
4
df <- data.frame(one=rep(1,5), two=rep(1,5), three=rep(1,5), four=rep(1,5))
toMatch <- paste(c("one", "two"), collapse="|")
##remove toMatch
grep_df_subset(df, toMatch)

StevisonLab/genotypeR documentation built on May 27, 2018, 6:59 a.m.