combine: Combine two SparseDataSet objects

Description Usage Arguments Value Author(s) Examples

Description

This method allows for two SparseDataSet-class objects to be combined, providing that they are defined over identical features and they have no shared sample names. The function ensures that the levels of the conditions are set to the union of the levels of conditions of x and y.

The means and sum of squares are carried over provided they are not in the intersection of the two condition levels (as these will need to be recalculated). Also the t-statistics are removed as these will change with a new global mean and global sum of squares.

The method defined for dgCMatrix objects combines two matrices using cBind

Usage

1
2
3
4
  ## S4 method for signature 'SparseDataSet,SparseDataSet'
combine(x,y,...)
  ## S4 method for signature 'dgCMatrix,dgCMatrix'
combine(x,y,...)

Arguments

x

a SparseDataSet or dgCMatrix

y

a SparseDataSet or dgCMatrix

...

additional arguments

Value

a SparseDataSet with combined sparseData, phenoData, featureData, experimentData and protocolData.

Author(s)

Michael Love

Examples

1
2
3
4
5
6
7
x <- simulateSparseDataSet(10,c(2,2,2))
y <- simulateSparseDataSet(10,c(2,2))
sampleNames(y) <- paste("sample",(ncol(x) + 1:ncol(y)),sep="")
pData(y)$sampleID <- sampleNames(y)
z <- combine(x,y)
pData(z)
sparseData(z)

mikelove/SparseData documentation built on May 22, 2019, 10:52 p.m.