Learn R Programming

DataVisualizations (version 1.3.3)

ClassBoxplot: Creates Boxplot plot for all classes

Description

Boxplot the data for all classes

Usage

ClassBoxplot(Data, Cls,  ColorSequence = DataVisualizations::DefaultColorSequence,

ClassNames = NULL,All=FALSE, PlotLegend = TRUE,

main = 'Boxplot per Class', xlab = 'Classes', ylab = 'Range of Data')

Value

A List of

ClassData

The DataFrame used to plot

ggobject

The ggplot2 plot object

in mode invisible

Arguments

Data

Vector of the data to be plotted

Cls

Vector of class identifiers.

ColorSequence

Optional: The sequence of colors used, Default: DefaultColorSequence()

ClassNames

Optional: The names of the classes. Default: C1 - C(Number of Classes)

All

Optional: adds full data vector for comparison against classes

PlotLegend

Optional: Add a legent to plot. Default: TRUE)

main

Optional: Title of the plot. Default: "ClassBoxPlot""

xlab

Optional: Title of the x axis. Default: "Classes"

ylab

Optional: Title of the y axis. Default: "Data"

Author

Michael Thrun, Felix Pape

Examples

Run this code
# \dontshow{
data(ITS)
#clustering only for testing
Classification=c(rep(1,8805),rep(2,2389))
DataVisualizations::ClassBoxplot(ITS,Classification)
# }

# \donttest{
data(ITS)
#please download package from cran
#model=AdaptGauss::AdaptGauss(ITS)
#Classification=AdaptGauss::ClassifyByDecisionBoundaries(ITS,

#DecisionBoundaries = AdaptGauss::BayesDecisionBoundaries(model$Means,model$SDs,model$Weights))

DataVisualizations::ClassBoxplot(ITS,Classification)$ggobject
# }

Run the code above in your browser using DataLab