## load library
library("readMzXmlData")
## get examples directory
exampleDirectory <- system.file("Examples", package="readMzXmlData")
## read example spectrum
spec <- readMzXmlFile(file.path(exampleDirectory, "A1-0_A1.mzXML"))
## print metaData
print(spec$metaData)
## plot spectrum
plot(spec$spectrum$mass, spec$spectrum$intensity, type="l")
Run the code above in your browser using DataLab