featureSummary: Simple feature summaries

View source: R/functions-XCMSnExp.R

featureSummaryR Documentation

Simple feature summaries


Simple function to calculate feature summaries. These include counts and percentages of samples in which a chromatographic peak is present for each feature and counts and percentages of samples in which more than one chromatographic peak was annotated to the feature. Also relative standard deviations (RSD) are calculated for the integrated peak areas per feature across samples. For 'perSampleCounts = TRUE' also the individual chromatographic peak counts per sample are returned.


  perSampleCounts = FALSE,
  method = "maxint",
  skipFilled = TRUE



'XCMSnExp' object with correspondence results.


'numeric', 'logical', 'character' or 'factor' with the same length than 'x' has samples to aggregate counts by the groups defined in 'group'.


'logical(1)' whether feature wise individual peak counts per sample should be returned too.


'character' passed to the [featureValues()] function. See respective help page for more information.


'logical(1)' whether filled-in peaks should be excluded (default) or included in the summary calculation.


'matrix' with one row per feature and columns:

- '"count"': the total number of samples in which a peak was found. - '"perc"': the percentage of samples in which a peak was found. - '"multi_count"': the total number of samples in which more than one peak was assigned to the feature. - '"multi_perc"': the percentage of those samples in which a peak was found, that have also multiple peaks annotated to the feature. Example: for a feature, at least one peak was detected in 50 samples. In 5 of them 2 peaks were assigned to the feature. '"multi_perc"' is in this case 10 - '"rsd"': relative standard deviation (coefficient of variation) of the integrated peak area of the feature's peaks. - The same 4 columns are repeated for each unique element (level) in 'group' if 'group' was provided.

If 'perSampleCounts = TRUE' also one column for each sample is returned with the peak counts per sample.


Johannes Rainer

sneumann/xcms documentation built on March 18, 2023, 6:24 p.m.