correlate,Chromatogram,Chromatogram-method {xcms} | R Documentation

## Correlate chromatograms

### Description

Correlate intensities of two chromatograms with each other. If the two `Chromatogram` objects have different retention times they are first aligned to match data points in the first to data points in the second chromatogram. See `align()` for more details.

### Usage

    ## S4 method for signature 'Chromatogram,Chromatogram'
    correlate(
      x,
      y,
      use = "pairwise.complete.obs",
      method = c("pearson", "kendall", "spearman"),
      align = c("matchRtime", "approx"),
      ...
    )

### Arguments

`x` | `Chromatogram()` object.
`y` | `Chromatogram()` object.
`use` | `character(1)` passed to the `cor` function. See `cor()` for details.
`method` | `character(1)` passed to the `cor` function. See `cor()` for details.
`align` | `character(1)` defining the alignment method to be used. See `align()` for details. The value of this parameter is passed to the `method` parameter of `align`.
`...` | optional parameters passed along to the `align` method.

### Value

`numeric(1)` with the correlation coefficient.

### Author(s)

Michael Witting, Johannes Rainer

[Package xcms version 3.10.2 Index]