radarBoxplot: Function to plot the radar-boxplot

Description Usage Arguments Examples

Description

Function to plot the radar-boxplot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
radarBoxplot(x, ...)

## S3 method for class 'formula'
radarBoxplot(x, data, ...)

## Default S3 method:
radarBoxplot(
  x,
  y,
  IQR = 1.5,
  use.ggplot2 = FALSE,
  mfrow = NA,
  oma = c(5, 4, 0, 0) + 0.1,
  mar = c(0, 0, 1, 1) + 0.1,
  innerPolygon = list(),
  outerPolygon = list(),
  innerBorder = list(),
  outerBorder = list(),
  medianLine = list(),
  outlierPoints = list(),
  nTicks = 4,
  ticksArgs = list(),
  axisArgs = list(),
  labelsArgs = list(),
  angleOffset = NA,
  ...
)

Arguments

x

a data frame or matrix of attributes or a formula describing the attributes for the class

...

parameter to allow the usage of S3 methods

data

dataset for fomula variant for which formula was defined

y

a response vector

IQR

numeric. The factor to multiply the IQR to define the outlier threshold. Default 1.5

use.ggplot2

if ggplot2 are available it will use ggplot for plotting: Default FALSE

mfrow

mfrow argument for defining the subplots nrows and ncols: Default will calculate the minimum square

oma

outer margins of the subplots: Default c(5,4,0,0) + 0.1

mar

margins of the subplots: Default c(0,0,1,1) + 0.1

innerPolygon

a list of optional arguments to override Q2-Q3 'graphics::polygon()' style: Default list()

outerPolygon

a list of optional arguments to override the outer (range) 'graphics::polygon()' default style: Default list()

innerBorder

a list of optional arguments to override the inner border 'graphics::lines()' default style: Default list()

outerBorder

a list of optional arguments to override the outer border 'graphics::lines()' default style: Default list()

medianLine

a list of optional arguments to override the median line 'graphics::lines()' default style: Default list()

outlierPoints

a list of optional arguments to override the outliers 'graphics::points()' default style: Default list()

nTicks

number of ticks for the radar chart: Default 4

ticksArgs

a list of optional arguments to override radar ticks 'graphics::lines()' default style: Default list()

axisArgs

a list of optional arguments to override radar axis 'graphics::lines()' default style: Default list()

labelsArgs

a list of optional arguments to override labels 'graphics::text()' default style: Default list()

angleOffset

offset for rotating the plots: Default will let the top free of axis to avoid its label overlapping the title

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
library(radarBoxplot)
data("winequality_red")

# Regular
radarBoxplot(quality ~ ., winequality_red)

# Orange and green pattern with grey median
radarBoxplot(quality ~ ., winequality_red,
             use.ggplot2=FALSE, medianLine=list(col="grey"),
             innerPolygon=list(col="#FFA500CC"),
             outerPolygon=list(col=rgb(0,.7,0,0.6)))

# Plot in 2 rows and 3 columns
# change columns order (counter clockwise)
radarBoxplot(quality ~ volatile.acidity + citric.acid +
             residual.sugar + fixed.acidity + chlorides +
             free.sulfur.dioxide + total.sulfur.dioxide +
             density + pH + sulphates + alcohol,
             data = winequality_red,
             mfrow=c(2,3))

radarBoxplot documentation built on Oct. 7, 2021, 9:16 a.m.