tupleApply {StabPerf} | R Documentation |
Apply a function over all possible groupwise combinations of sample groups.
Description
Apply a function over all possible groupwise combinations of sample groups.
Usage
tupleApply(data, labels, func, ...)
Arguments
data |
data.frame containing expression data (samples in columns, genes in rows) |
labels |
factor defining grouping of samples |
func |
function (as string) to call with the parameters:(data, labels, group1, group2) |
... |
any additional parameters to pass to func() |
Details
Apply a function over all possible groupwise combinations of sample groups. The workload is spawned to a cluster, if available.
Value
matrix |
a 3D matrix indexed by [group-id, group-id, gene-id]. The first two dimensions of which are an upper diagonal matrix. |
See Also
tuples
, snow.cluster
Examples
data <- loadData("data/dataset.RData")
# calculate the foldChange for all spots between all classes
combined <- tupleApply(data$x, data$y, foldChange)
[Package
StabPerf version 0.5
Index]