Learn R Programming

specmine (version 3.1.6)

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
# NOT RUN {
  ## Example of plotting a variable's distribution with 2 factors
  library(specmine.datasets)
  data(propolis)
  propolis_proc = missingvalues_imputation(propolis)
  plotvar_twofactor(propolis_proc, "0.46", "seasons", "agroregions")
# }

Run the code above in your browser using DataLab