ez.radarmap: draw a radar plot

View source: R/plot.R

ez.radarmapR Documentation

draw a radar plot

Description

variables/axes arranged in the shape of a radar map, scales are rescaled to 0-1
best works with multivariates

Usage

ez.radarmap(
  df,
  id,
  stats = "mean",
  lwd = 1,
  angle = 0,
  fontsize = 0.8,
  facet = FALSE,
  facetfontsize = 1,
  color = id,
  linetype = NULL
)

Arguments

df

a data frame with a single variable as factor and all othere variables being numeric

id

column name as id in quotes ""

stats

perform stats (with NA removed) grouped by id, "mean", "median", "sd", "var", "none"; if "none", assume df already has summary stats

lwd

line width

angle

angle to show the variable names

fontsize

fontsize of variable names, if 0, no variable names shown

facet

if F show each id level separately; if T show all levels in one plot

facetfontsize

fontsize of id level names (only valid when facet=T)

color

color for different id levels, if NULL, remain the same for different id levels

linetype

linetype for different id levels, if NULL, remain the same for different id levels

Value

a ggplot object (+theme_apa() to get apa format plot)

Note

As a reminder, the returned ggplot object can be modified post-hoc

References

Erwan Le Pennec - CMAP


jerryzhujian9/zmisc documentation built on March 9, 2024, 12:49 a.m.