View source: R/summarizeGroups.R
summarizeGroups | R Documentation |
Summarize sample data by group using a specified summary function. The summary function provided must take a data frame with one or more columns corresponding to samples. It must return a data frame with the same number of rows and one column.
summarizeGroups(ftmsObj, summary_functions)
ftmsObj |
an object of class 'peakData' or 'compoundData' or a ddo of
ftmsData objects (e.g. the output of |
summary_functions |
vector of summary function names to apply to each
row of |
If the input is an ftmsData object, the result will be a new
ftmsData
object where each provided summary function will be applied
to each group found in getGroupDF(ftmsObj)
. If
getGroupDF(ftmsObj) == null
the function will assume all samples
belong to a single group. If the input is a ddo the result will be a ddo
where each value is the result of applying summarizeGroups
to each
value of the input.
Amanda White
data("exampleProcessedPeakData")
summary1 <- summarizeGroups(exampleProcessedPeakData,
summary_functions=c("n_present", "prop_present"))
groupDdo <- divideByGroup(exampleProcessedPeakData)
summary2 <- summarizeGroups(groupDdo, summary_functions=c("n_present", "prop_present"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.