filterData: Expression based row filtering

Description Usage Arguments Value See Also Examples

Description

This is a simple function to filter data based on an expression defined using the colum names

Usage

1
filterData(data, condition = "TRUE", remove.cols = NULL)

Arguments

data

A NAMED matrix or data frame to be filtered (column names are required).

condition

A string indicating the condition that the row have to fulfill to be retained. The column names are used as variables in the condition (see examples bellow).

remove.cols

Either a vector of column names or a vector of column indices to be removed from the result

Value

The original data where the rows for which the condition is FALSE and the columns in the vector remove.cols have been removed

See Also

summarizeData, writeTabular and the vignette vignette(topic="Data_loading_and_manipulation", package="scmamp")

Examples

1
2
3
data(data_gh_2008)
names(data.gh.2008)
filterData(data.gh.2008, condition="CN2 > 0.7 & Kernel < 0.7", remove.cols=1:2)

scmamp documentation built on May 1, 2019, 10:10 p.m.