plotvar_twofactor: Plot variable distribution on two factors

Description Usage Arguments Value Examples

View source: R/graphics.R

Description

Plot variable distribution on two factors from the dataset.

Usage

1
2
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

1
2
3
4
5
  ## 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")

specmine documentation built on Sept. 21, 2021, 5:06 p.m.