plotMDS: Multidimensional scaling (MDS) plot

plotMDSR Documentation

Multidimensional scaling (MDS) plot

Description

Plot multidimensional scaling plot for a RandomForest class object.

Usage

plotMDS(
  x,
  cls = "class",
  label = NULL,
  shape = FALSE,
  ellipses = TRUE,
  title = "",
  legendPosition = "bottom",
  labelSize = 2
)

## S4 method for signature 'RandomForest'
plotMDS(
  x,
  cls = "class",
  label = NULL,
  shape = FALSE,
  ellipses = TRUE,
  title = "",
  legendPosition = "bottom",
  labelSize = 2
)

## S4 method for signature 'list'
plotMDS(
  x,
  label = NULL,
  shape = FALSE,
  ellipses = TRUE,
  title = "",
  legendPosition = "bottom",
  labelSize = 2
)

Arguments

x

S4 object of class RandomForest

cls

sample information column to use for sample labelling, Set to NULL for no labelling.

label

sample information column to use for sample labels. Set to NULL for no labels.

shape

TRUE/FALSE use shape aesthetic for plot points. Defaults to TRUE when the number of classes is greater than 12

ellipses

TRUE/FALSE, plot multivariate normal distribution 95% confidence ellipses for each class

title

plot title

legendPosition

legend position to pass to legend.position argument of ggplot2::theme. Set to "none" to remove legend.

labelSize

label size. Ignored if label is NULL

Examples

library(metaboData)

x <- analysisData(abr1$neg[,200:300],abr1$fact) %>%
       occupancyMaximum(cls = 'day') %>%
       transformTICnorm()
       
rf <- randomForest(x,cls = 'day')

plotMDS(rf,cls = 'day')

jasenfinch/metabolyseR documentation built on Sept. 18, 2023, 1:25 a.m.