Learn R Programming

IdMappingAnalysis (version 1.16.0)

Subset$byRow: Extract subset of columns from a data frame or a list of data frames by intersecting on a particular row

Description

Extract subset of columns from a data frame or a list of data frames by intersecting on a particular row. This function outputs a data frame which set of columns is a product of intersecting on a particular row of the imput data frame(s) columns with a given set of names (subset).

Usage

## Static method (use this): ## Subset$byRow(frameData, subset, row, verbose=FALSE, ...)
## Don't use the below: "byRow"(static, frameData, subset, row, verbose=FALSE, ...)

Arguments

frameData
Input data.frame or a list of data frames.
subset
character vector of names partially intersecting with given data.frame row and defining the set on which merging is to be performed.
row
The row on which the intersection is to be performed.
verbose
If TRUE enables diagnostic messages. Default is FALSE.
...
Not used

Value

A data.frame or list of data frames which column set is a product of intersecting of a particular row with a (partially intersecting) subset.

See Also

For more information see Subset.

Examples

Run this code
 #extract msms experiment subset containing only samples
 #for which the event count for Uniprot='P04264' takes predefined values 1,2 and 3
 cnts<-c(1,2,3);
 subset.cnts<-Subset$byRow(examples$msmsExperimentSet[-1],cnts,row="P04264");
 dim(subset.cnts);
 

Run the code above in your browser using DataLab