getMBRecordPeaks: Get A Peak List from MassBank Record

Description Usage Arguments Value Author(s) See Also Examples

View source: R/MassBankRecordeR.R

Description

This function extracts the peak list from a MassBank record, returning a variable containing the peak m/z, intensity and relative intensity entries. The column names are either original, or adjusted to be more R-friendly. Use the function getMBPeaksAnnos to get peak lists with annotations.

Usage

1
getMBRecordPeaks(MBrecord, fixColNames = FALSE)

Arguments

MBrecord

File name (and path) to a valid MassBank record file.

fixColNames

Default FALSE uses the column names in the MassBank record, i.e. m/z, int. and rel.int.. Use TRUE to make this more R-friendly. The function fixMzIntColNames is used to do this.

Value

Returns a data frame containing peak data, or NULL if the retrieval failed.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>, based on code from Erik Mueller.

See Also

getMBPeaksAnnos, fixMzIntColNames.

Examples

1
2
3
MBrecord <- system.file("extdata","EA020161_Diclofenac.txt",package="ReSOLUTION")
getMBRecordPeaks(MBrecord, fixColNames = FALSE)
getMBRecordPeaks(MBrecord, fixColNames = TRUE)

schymane/ReSOLUTION documentation built on May 22, 2021, 3:41 a.m.