View source: R/visualization.R
| plot_radar | R Documentation |
Draws a radar (spider) chart comparing mean variable scores across groups. Useful for visualising the multidimensional soil quality profile of each land-use system.
plot_radar(
scored,
config,
group_col,
group_cols = group_col,
vars = NULL,
title = "Soil Quality Radar Profile",
palette = c("#1b7837", "#762a83", "#d6604d", "#4393c3", "#f4a582")
)
scored |
A scored data frame from |
config |
A |
group_col |
Character. Column used to define radar chart series. |
group_cols |
Character vector of all grouping columns. |
vars |
Character vector of variables to include. Defaults to all
in |
title |
Character. Plot title. |
palette |
Character vector of colours for each group. |
Invisible NULL; the chart is rendered to the active
graphics device.
Chambers, J.M., & Hastie, T.J. (1992). Statistical Models in S. Wadsworth & Brooks/Cole.
data(soil_data)
cfg <- make_config(
variable = c("pH","EC","BD","OC","MBC","Clay"),
type = c("opt","less","less","more","more","opt"),
opt_low = c(6.0, NA, NA, NA, NA, 20),
opt_high = c(7.0, NA, NA, NA, NA, 35)
)
scored <- score_all(soil_data, cfg, group_cols = c("LandUse","Depth"))
plot_radar(scored, cfg, group_col = "LandUse",
group_cols = c("LandUse","Depth"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.