aveSpec: Compute mean spectrum of a set of spectra

Description Usage Arguments Details Value Author(s) Examples

View source: R/aveSpec.R

Description

Compute mean spectrum of a set of spectra.

Usage

1
aveSpec(nVec)

Arguments

nVec

A character vector of file names.

Details

'aveSpec' computes the point-wise mean of intensities of a set of spectra over the whole range of the m/z values.

Value

A matrix with 2 columns, the first being the m/z values and the 2nd being the average of intensities corresponding to the m/z value in the first column of the same row.

Author(s)

Xiaochun Li

Examples

1
2
3
testfs <- dir(system.file("Test", package = "PROcess"),
	full.names=TRUE)
testAve <- aveSpec(testfs)

Example output

Loading required package: Icens
Loading required package: survival

Attaching package:PROcessThe following object is masked frompackage:stats:

    sigma

PROcess documentation built on Nov. 8, 2020, 5:44 p.m.