Learn R Programming

specmine (version 1.0)

plotvar_twofactor: Plot variable distribution on two factors

Description

Plot variable distribution on two factors from the dataset.

Usage

plotvar_twofactor(dataset, variable, meta.var1, meta.var2, colour = "darkblue", title = "", xlabel = NULL, ylabel = NULL)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
variable
variable's name.
meta.var1
first metadata's variable.
meta.var2
second metadata's variable.
colour
colours of the bodies of the boxplots.
title
title of the plot.
xlabel
x-axis label.
ylabel
y-axis label.

Value

Returns the plot object from ggplot function.

Examples

Run this code
  ## Example of plotting a variable's distribution with 2 factors
  data(cassavaPPD)
  plotvar_twofactor(cassavaPPD, "399.3", "varieties", "ppds")

Run the code above in your browser using DataLab