binningCosts: This function calculates binning costs (differences between...

Description Usage Arguments Value See Also Examples

View source: R/binningCosts-functions.R

Description

This function calculates binning costs (differences between masses pre and post binning).

Usage

1
  binningCosts(pre, post, relative = TRUE)

Arguments

pre

list of MassPeaks (pre binning)

post

list of MassPeaks (post binning)

relative

logical, should costs represent by a costs vs mass position ratio?

Value

a list of binning costs (percental differences)

See Also

binPeaks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pre <- list(createMassPeaks(mass=1:5, intensity=1:5),
            createMassPeaks(mass=1:5+0.1, intensity=1:5),
            createMassPeaks(mass=1:5+0.2, intensity=1:5))
post <- binPeaks(pre, tolerance=0.2)

str(binningCosts(pre, post))
# List of 3
# $ : num [1:5] 0.0909 0.0476 0.0323 0.0244 0.0196
# $ : num [1:5] 0 0 0 0 0
# $ : num [1:5] 0.0909 0.0476 0.0323 0.0244 0.0196

sgibb/MALDIquantTools documentation built on Oct. 18, 2019, 8:02 p.m.