# NOT RUN {
## load package
library("MALDIquant")
## create a MassPeaks object
p <- createMassPeaks(mass=1:5, intensity=1:5)
## stupid warping function for demonstration
## (please use determineWarpingFunctions in real life applications)
simpleWarp <- function(x) { return(1) }
## run warping function
w <- warpMassPeaks(list(p), list(simpleWarp))[[1]]
## compare results
all(mass(w) == mass(p)+1) # TRUE
# }
Run the code above in your browser using DataLab