ggRadar: Draw a radar chart

Description Usage Arguments Value Examples

View source: R/ggRadar.R

Description

Draw a radar chart

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
ggRadar(
  data,
  mapping = NULL,
  rescale = TRUE,
  legend.position = "top",
  colour = "red",
  alpha = 0.3,
  size = 3,
  ylim = NULL,
  scales = "fixed",
  use.label = FALSE,
  interactive = FALSE,
  ...
)

Arguments

data

A data.frame

mapping

Set of aesthetic mappings created by aes or aes_.

rescale

A logical value. If TRUE, all continuous variables in the data.frame are rescaled.

legend.position

Legend position. One of c("top","bottom","left","right","none")

colour

A name of color to be assigned as a color variable

alpha

Any numbers from 0 (transparent) to 1 (opaque)

size

Point size

ylim

A numeric vector of length 2, giving the y coordinates ranges.

scales

should Scales be fixed ("fixed", the default), free ("free"), or free in one dimension ("free_x", "free_y")

use.label

Logical. Whether or not use column label

interactive

A logical value. If TRUE, an interactive plot will be returned

...

other arguments passed on to geom_point

Value

An interactive radar plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
require(ggplot2)
require(ggiraph)
require(plyr)
require(reshape2)
require(moonBook)
require(sjmisc)
ggRadar(data=iris,aes(group=Species))
ggRadar(data=mtcars,interactive=TRUE)
ggRadar(data=mtcars,aes(colour=am,facet=cyl),interactive=TRUE)
ggRadar(data=acs,aes(colour=Dx,facet=Dx))
ggRadar(iris,aes(x=c(Sepal.Length,Sepal.Width,Petal.Length,Petal.Width)))

Example output

Loading required package: ggplot2
Loading required package: ggiraph
Loading required package: plyr
Loading required package: reshape2
Loading required package: moonBook

Attaching package: 'moonBook'

The following objects are masked from 'package:ggiraphExtra':

    addLabelDf, getMapping

Loading required package: sjmisc
Install package "strengejacke" from GitHub (`devtools::install_github("strengejacke/strengejacke")`) to load all sj-packages at once!

ggiraphExtra documentation built on Oct. 23, 2020, 7:39 p.m.