getDefaultRetCorCenterSample: Gets the index of the sample with most peaks in it.

View source: R/optimizeRetCorGroupParameters.R

getDefaultRetCorCenterSampleR Documentation

Gets the index of the sample with most peaks in it.

Description

Gets the index of the sample with most peaks in it. This is used if no center sample for retention time correction has been defined by the user.

Usage

getDefaultRetCorCenterSample(xset)

Arguments

xset

xcmsSet object

Details

Gets the index of the sample with most peaks in it. This is used if no center sample for retention time correction has been defined by the user.

Value

The file index of the sample with most peaks in it.

Author(s)

Gunnar Libiseller

Examples



## The function is currently defined as
function (xset) 
{
    ret <- NULL
    for (i in 1:length(filepaths(xset))) {
        ret <- c(ret, sum(peaks(xset)[, "sample"] == i))
    }
    return(which.max(ret))
  }

rietho/IPO documentation built on Dec. 6, 2022, 8:17 a.m.