R/plotMsSpectrum.R

Defines functions plotMsSpectrum

Documented in plotMsSpectrum

plotMsSpectrum <- function(x,i){
        no <- x[[i]]$a[[2]]
        no <- gsub("# of Peaks", "Number of Peaks = ",no)
        y <- data.frame(x[[i]]$b)
        colnames(y) <- c("mass","absolute","relative")
        plot(as.character(y$mass),as.character(y$relative),type="h",xlab ="Mass/Charge", ylab = "Relative Intensity",col=ifelse(y$relative=="100.00", "red","black"), main = no)
        }

Try the HTDA package in your browser

Any scripts or data that you put into this service are public.

HTDA documentation built on May 2, 2019, 4:53 p.m.