# load test data
utils::data(apci_spectrum)
# provide information of a correct peak (if you know) as character
cp <- "Glutamic acid (3TMS), C14H33NO4Si3, 364.1790"
# provide database of known peaks and correct peak
mdb <- data.frame(
"Name" = c("Glutamic acid (3TMS)", "other peak with same sum formula"),
"Formula" = c("C14H33NO4Si3", "C14H33NO4Si3"),
"M+H" = c(364.179, 364.179), stringsAsFactors = FALSE, check.names = FALSE
)
# provide a database of precalculated formulas to speed up the process
fdb <- system.file("extdata", "APCI_min.db", package = "InterpretMSSpectrum")
# apply function providing above arguments (dppm is set to 0.5 to reduce run time)
InterpretTP(fml = "C14H33NO4Si3", spec=apci_spectrum, param="APCIpos")
Run the code above in your browser using DataLab