getR | R Documentation |
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
.
getR(checked, resmass, nknots = 13, spar = 0.1, plotit = TRUE)
checked |
Dataframe produced by |
resmass |
Dataframe with two columns, resolution and mass; such as the list entries in |
nknots |
Integer number of knots to use for the smoothing spline. Default = 6. See also |
spar |
Smoothing parameter, (0,1]. See also |
plotit |
Plot results, |
Vector with resolutions.
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.
Martin Loos, Christian Gerber
smooth.spline
check_chemform
resolution_list
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.