Learn R Programming

strvalidator (version 0.1)

trim: Trim data

Description

trim Extracts data from a larger data set.

Usage

trim(data, samples = NULL, columns = NULL, word = FALSE,
    ignoreCase = TRUE, invertS = FALSE, invertC = FALSE,
    rmNaCol = TRUE, rmEmptyCol = TRUE, missing = NA)

Arguments

data
data frame with genotype data in 'slim' format.
samples
string giving sample names separated by pipe.
columns
string giving column names separated by pipe.
word
logical indicating if a word boundary should be added to samples and columns.
ignoreCase
logical, TRUE ignore case in sample names.
invertS
logical, FALSE samples given will be removed from 'data' while TRUE will remove samples NOT given.
invertC
logical, FALSE columns given will be removed from 'data' while TRUE will remove columns NOT given.
rmNaCol
logical, TRUE columns with only NA are removed from 'data' while FALSE will preserve the columns.
rmEmptyCol
logical, TRUE columns with no values are removed from 'data' while FALSE will preserve the columns.
missing
value to replace missing values with.

Value

  • data.frame with extracted result.

Details

Simplifies extraction of specific data from a larger set of typing data.