getModel {metabCombiner} | R Documentation

## Get Fitted RT Model

### Description

Returns the last fitted RT projection model from a metabCombiner object of type "gam" or "loess".

### Usage

    getModel(object, fit = c("gam", "loess"))

    ## S4 method for signature 'metabCombiner'
    getModel(object, fit = c("gam", "loess"))

### Arguments

`object` | metabCombiner object
`fit` | Choice of model, "gam" or "loess"

### Value

nonlinear retention time fit object

### See Also

`fit_gam`, `fit_loess`

### Examples

    data(plasma30)
    data(plasma20)
    p30 <- metabData(plasma30, samples = "CHEAR")
    p20 <- metabData(plasma20, samples = "Red", rtmax = 17.25)
    p.comb <- metabCombiner(xdata = p30, ydata = p20, binGap = 0.005)
    p.comb <- selectAnchors(p.comb, tolrtq = 0.15, tolQ = 0.2, windy = 0.02)
    p.comb <- fit_gam(p.comb, iterFilter = 1, k = 20, family = "gaussian")
    p.comb <- fit_loess(p.comb, iterFilter = 1, spans = 0.2)
    model.gam <- getModel(p.comb, fit = "gam")
    model.loess <- getModel(p.comb, fit = "loess")

[Package metabCombiner version 1.4.0 Index]