radarChart: A function to produce a radar chart designed for mapping...

Description Usage Arguments Examples

View source: R/radarChart.R

Description

Given a set of skills and scores for expertise, the function produces a radar chart as a tool to map our skills status and progress.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
radarChart(
  scores,
  names,
  levels,
  polygon.col = "red",
  polygon.alpha = 0.1,
  polygon.pch = 19,
  axisLabelPad = 1.2,
  circles = FALSE,
  add = FALSE,
  main = "",
  margins = c(3, 3, 3, 3),
  addPoints = FALSE,
  radar.col = grDevices::rgb(0, 0, 0, 0.5),
  radar.lty = 1,
  radar.lwd = 0.5,
  levels.font = 1,
  levels.cex = 1,
  labels.font = 2,
  labels.cex = 1,
  levelsAxesAngle = 0,
  levelsLabelsAngle = 0
)

Arguments

scores

Numeric vector of scores for each skill provided

names

Vector of character strings providing the name of each skill

levels

Vector of labels for each skills level

polygon.col

The fill colour for the skills polygon. Default value is "red".

polygon.alpha

The transparency of the fill colour for the skills polygon. Default value is 0.1.

polygon.pch

The shape of the points on skills polygon. Default value is 19. Ignored if addPoints is FALSE.

axisLabelPad

The spacing between the name of each skill and the radar chart. Default value is 1.2.

circles

A boolean value indicating whether to plot skills levels as polygons or circles. Default value is FALSE.

add

A boolean value indicating whether to create a new radar chart or add to an existing one. Default value is FALSE.

main

Plot title. Default value is empty.

margins

A numeric vector specifying the sizes of the margins in inches (bottom, left, top, right). Default value is c(3,3,3,3).

addPoints

A boolean value indicating whether to plot points in skills polygon corners. Default value is FALSE.

radar.col

The colour of the skills levels. Default value is rgb(0,0,0, 0.5).

radar.lty

The line type for the skills levels. Default value is 1.

radar.lwd

The line width for the skills levels. Default value is 0.5.

levels.font

The font of the skills levels labels. Default value is 1.

levels.cex

The size of the skills levels labels. Default value is 1.

labels.font

The font of the names of the skills. Default value is 2.

labels.cex

The size of the names of the skills. Default value is 1.

levelsAxesAngle

The angle of the skills levels axis. Default value is 0.

levelsLabelsAngle

The angle of the skills levels labels on skills levels axis. Default value is 0.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Create a radar chart to map our current status for selected skills
radarChart(scores=c(4,3.5,2,3,3,3), 
           names=c("Programming", "Statistics", "Databases", "Projects",
                   "Web", "Versioning"),
           levels=c("Unaware","Aware","Working","Practitioner", "Expert"))

# Add to the radar chart where we aim to get to
radarChart(scores=c(4,3.75,3,4,3,4), 
           names=c("Programming", "Statistics", "Databases", "Projects",
                   "Web", "Versioning"),
           levels=c("Unaware","Aware","Working","Practitioner", "Expert"),
           polygon.col="blue", add=TRUE)

# Add a legend
legend("topright", 
       legend=c("Current", "Aim"), 
       text.col=c(rgb(1,0,0, 0.5), rgb(0,0,1, 0.5)), 
       bty="n", text.font=2, cex=1.5, xpd=TRUE)

JosephCrispell/plotteR documentation built on June 6, 2021, 7:24 p.m.