getR {enviPat}R Documentation

Interpolation of MS measurement resolution

Description

Given a set of MS measurement resolutions (R) as a function of measurement mass (m/z), getR interpolates R for any given molecular mass(es) calculated by check_chemform using smooth.spline.

Usage

getR(checked, resmass, nknots = 13, spar = 0.1, plotit = TRUE)

Arguments

checked

Dataframe produced by check_chemform.

resmass

Dataframe with two columns, resolution and mass; such as the list entries in resolution_list.

nknots

Integer number of knots to use for the smoothing spline. Default = 6. See also smooth.spline.

spar

Smoothing parameter, (0,1]. See also smooth.spline.

plotit

Plot results, TRUE/FALSE ?

Value

Vector with resolutions.

Note

check_chemform gives molecular masses (m/z) for z=+/-1 only. If z>1 or z<-1 is required, molecular mass entries in argument checked have to be divided accordingly to be consistent.

Author(s)

Martin Loos, Christian Gerber

See Also

smooth.spline check_chemform resolution_list

Examples


data(resolution_list)
resmass<-resolution_list[[4]]
data(isotopes)
data(chemforms)
checked<-check_chemform(isotopes,chemforms)
resolution<-getR(checked,resmass,nknots=13,spar=0.1,plotit=TRUE)

# same for z=-2:
checked<-check_chemform(isotopes,chemforms)
checked[,3]<-(checked[,3]/abs(-2))
resolution<-getR(checked,resmass,nknots=13,spar=0.1,plotit=TRUE)

[Package enviPat version 2.6 Index]