compCV: Compare CV

Description Usage Arguments Details Value Examples

View source: R/ncGTWutility.R

Description

This function calculates the coefficient of variation of each feature.

Usage

1
compCV(XCMSresFilled, na.rm = FALSE)

Arguments

XCMSresFilled

A xcmsSet-class object.

na.rm

Omit the samples in which the feature is not detected, and the default is FALSE.

Details

This function calculates the coefficient of variation of each feature across all the samples. If a sample is detected with more than one peaks in the feature, the function will pick the one with the highest intensity value.

Value

A vector of the same length as the row number of the group slot in XCMSresFilled, in which each element is the CV.

Examples

1
2
3
4
5
# obtain data
data('xcmsExamples')
xcmsLargeWin <- xcmsExamples$xcmsLargeWin

cv <- compCV(xcmsLargeWin)

ChiungTingWu/ncGTW documentation built on Dec. 30, 2019, 10:12 p.m.