byColNames.Subset: Extract subset of columns from a data frame or a list of data...

Description Usage Arguments Value Author(s) See Also Examples

Description

Extract subset of columns from a data frame or a list of data frames. This function outputs a data frame which set of columns is a product of merging according to mergeOp of the imput data frame column set with a given set of names (subset) ordred either by the original column set or by a a subset parameter according to orderBySubset flag. In case the merging operation produces the columns which are not in an original data frame, the new columns are filled with value from na.value parameter.

Usage

1
2
3
4
5
6
## Static method (use this):
## Subset$byColNames(frameData, subset, orderBySubset=TRUE, mergeOp=intersect, na.value="", verbose=FALSE, ...)

## Don't use the below:
## S3 method for class 'Subset'
byColNames(static, frameData, subset, orderBySubset=TRUE, mergeOp=intersect, na.value="", verbose=FALSE, ...)

Arguments

frameData

Input data.frame or a list of data frames.

subset

character vector of names partially intersecting with given data.frame column names and defining the set on which merging is to be performed.

orderBySubset

Determines if the resulting data frame(s) columns will be ordered by subset (TRUE) or by the original column set (FALSE). Default is TRUE.

mergeOp

The merging operation to be performed on column names. Default in 'intersect'.

na.value

The value which should be used to field the empty columns in the output data.frame (s). Default is "".

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 column merging on a subset according to the mergeOp.

Author(s)

Alex Lisovich, Roger Day

See Also

For more information see Subset.

Examples

1
2
3
4
5
6
 commonSamples<-intersect(colnames(examples$msmsExperimentSet),
		colnames(examples$msmsExperimentSet));
 mrna.subset<-Subset$byColNames(examples$mrnaExperimentSet,
		commonSamples,orderBySubset=TRUE);
 mrna.subset[1:10,1:5];
 

IdMappingAnalysis documentation built on Oct. 31, 2019, 3:30 a.m.