| Title: | Create radar charts using ggplot2 |
|---|---|
| Description: | This package exports the functionality of ggplot2 to create radar charts. |
| Authors: | Ricardo Bion [aut, cre] |
| Maintainer: | Ricardo Bion <[email protected]> |
| License: | GPL |
| Version: | 0.2 |
| Built: | 2026-10-15 09:10:48 UTC |
| Source: | https://github.com/ricardo-bion/ggradar |
Calculates x-y coordinates for a set of radial axes (one per variable being plotted in radar plot)
CalculateAxisPath(var.names, min, max)CalculateAxisPath(var.names, min, max)
var.names |
list of variables to be plotted on radar plot |
min |
MININUM value required for the plotted axes (same value will be applied to all axes) |
max |
MAXIMUM value required for the plotted axes (same value will be applied to all axes) |
a dataframe of the calculated axis paths
Converts variable values into a set of radial x-y coordinates
CalculateGroupPath(df)CalculateGroupPath(df)
df |
a dataframe with Col 1 is group ('unique' cluster / group ID of entity) and Col 2-n are v1.value to vn.value - values (e.g. group/cluser mean or median) of variables v1 to v.n |
a dataframe of the calculated axis paths
Code adapted from a solution posted by Tony M to http://stackoverflow.com/questions/9614433/creating-radar-chart-a-k-a-star-plot-spider-plot-using-ggplot2-in-r.
Generate coordinates to draw a circle.
funcCircleCoords(center = c(0, 0), r = 1, npoints = 100)funcCircleCoords(center = c(0, 0), r = 1, npoints = 100)
center |
coordinate for centroid |
r |
radius |
npoints |
number of coordinates to generate |
a dataframe
Adapted from Joran's response to http://stackoverflow.com/questions/6862742/draw-a-circle-with-ggplot2.