Description Usage Arguments Value Author(s) Examples
These methods calculate summary statistics over subsets of an imaging experiment.
1 2 3 4 5 6 7 8 | ## S4 method for signature 'SparseImagingExperiment'
aggregate(x, by = c("feature", "pixel"), FUN,
groups = NULL, tform = identity, as = "ImagingExperiment",
BPPARAM = getCardinalBPPARAM(), ...)
summarizeFeatures(x, FUN = "mean", ...)
summarizePixels(x, FUN = "mean", ...)
|
x |
An imaging dataset. |
by |
Should the summarization be performed over pixels or features? |
FUN |
A function or list of functions that return statistical summaries. Known statistics can be provided to be computed more efficiently than providing the equivalent function. Known statistics include "min", "max", "mean", "sum", "sd", and "var". |
groups |
A grouping variable for summarization. The summary functions will be applied within each group. |
tform |
A unary transformation that should each row or column be transformed before summarization is applied. |
as |
What class of object should be returned ( |
BPPARAM |
An optional |
... |
Additional arguments to be passed to |
An ImagingExperiment
subclass if as=="ImagingExperiment"
or a DataFrame
subclass otherwise.
Kylie A. Bemis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | set.seed(1)
mse <- simulateImage(preset=1, npeaks=10, dim=c(10,10))
# calculate median spectrum
aggregate(mse, by="feature", FUN=median, as="DataFrame")
# summarize mean spectrum
summarizeFeatures(mse, FUN="mean", as="DataFrame")
# summarize image by TIC
summarizePixels(mse, FUN=c(tic="sum"), as="DataFrame")
# summarize mean spectrum grouped by pixels in/out of circle
summarizeFeatures(mse, FUN="mean", groups=mse$circle, as="DataFrame")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.