Description Usage Arguments Author(s) Examples
Calculate the means and sum of squares for a SparseDataSet. The means and sum of squares from samples within a condition are calculated and then added as a named list of sparse columns (dgCMatrix objects). An additional sparse column named 'global' is added to each which is the mean of the condition means and the sum of the condition sums of squares.
This function makes use of the mclapply
function in the
parallel package, to allow the user to distribute mean and sum of
squares calculations across cores.
1 2 3 | ## S4 method for signature 'SparseDataSet'
calculateMeans( object, nzr=1, quiet=FALSE,
recalc=FALSE, ... )
|
object |
a SparseDataSet |
nzr |
the desired nonzero ratio: the means and sum of squares
can be thresholded by |
quiet |
should the function not print out each condition name as it is calculated |
recalc |
should the function recalculate all means and sum of squares, or only those which are present in the conditions but missing from the means and sumSquares slots |
... |
extra arguments passed to |
Michael Love
1 2 3 | sds <- simulateSparseDataSet(5, c(5,5))
sds <- calculateMeans(sds)
means(sds)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.