Learn R Programming

specmine (version 1.0)

plot_spectra: Plot spectra

Description

Plot spectra from dataset.

Usage

plot_spectra(dataset, column.class, func = NULL, samples = NULL, variable.bounds = NULL, xlab = NULL, ylab = NULL, lty = 1, legend.place = "topright", cex = 0.8, reverse.x = F, ...)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
column.class
string indicating the metadata's variable.
func
function to compute the summary statistics to apply to the data.
samples
vector with samples' names, if NULL all the samples will be considered.
variable.bounds
numeric vector with two elements indicating the interval of x-values to plot.
xlab
x-axis label.
ylab
y-axis label.
lty
parameter of matplot.
legend.place
string indicating the place that the legend's box will be placed.
cex
numeric value that indicates the amount by which the legend is magnified relative to the default.
reverse.x
boolean value indicating if the x-axis will be shown reversed or not.
...
additional parameters to matplot.

Examples

Run this code
  ## Example of plotting spectra (simple)
  data(cassavaPPD)
  plot_spectra(cassavaPPD, "varieties", func = NULL, 
   samples = c("BRA_1", "IAC5_4"), variable.bounds = c(1000,2000), 
   legend.place = "topright")

Run the code above in your browser using DataLab