knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
First we get our exemplar .msa format spectrum file.
library(rEDS) fi <- system.file("extdata", "Benitoite.msa", package = "rEDS") print(fi)
Then we create a Spectrum object using the SingleMSA
function.
spc <- singleMSA(fi, probecur=2.5)
We can also create a ggplot with a linear intensity scale
plt <- ggplotSpectrumLinY(fi, "Benitoite", 0.2, 7.0, 1.0, 2.5) print(plt)
and with one with a logarithmic intensity
plt <-ggplotSpectrumLogY(fi, "Benitoite", 0.2, 7.0, 1.0, 2.5) print(plt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.