compCV {ncGTW} | R Documentation

## Compare CV

### Description

This function calculates the coefficient of variation of each feature.

### Usage

    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

    # obtain data
    data('xcmsExamples')
    xcmsLargeWin <- xcmsExamples$xcmsLargeWin

    cv <- compCV(xcmsLargeWin)

[Package ncGTW version 1.2.0 Index]