radar charts with ggplot2
Switch branches/tags
Nothing to show
Clone or download
Latest commit b1c3a49 Nov 27, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Update ggradar.R Nov 27, 2018
README_files/figure-html Revert figure for readme Oct 29, 2017
man create package Feb 21, 2016
DESCRIPTION create package Feb 21, 2016
NAMESPACE create package Feb 21, 2016
README.Rmd Fix font location link to github Oct 29, 2017
README.md Update README.md Nov 27, 2018

README.md

ggradar

ggradar allows you to build radar charts with ggplot2. This package is based on Paul Williamson's code, with new aesthetics and compatibility with ggplot2 2.0.

It was inspired by d3radaR, an htmlwidget built by timelyportfolio.

Install ggradar

devtools::install_github("ricardo-bion/ggradar", 
                          dependencies=TRUE)

Use ggradar

library(ggradar)

suppressPackageStartupMessages(library(dplyr))
library(scales)
library(tibble)

mtcars %>%
     rownames_to_column( var = "group" ) %>%
     mutate_at(vars(-group),funs(rescale)) %>%
     tail(4) %>% select(1:10) -> mtcars_radar

ggradar(mtcars_radar) 

knitr::kable(mtcars_radar,format="markdown") 
group mpg cyl disp hp drat wt qsec vs am
29 Ford Pantera L 0.2297872 1.0 0.6981791 0.7491166 0.6728111 0.4236768 0.0000000 0 1
30 Ferrari Dino 0.3957447 0.5 0.1843352 0.4346290 0.3963134 0.3214012 0.1190476 0 1
31 Maserati Bora 0.1957447 1.0 0.5734597 1.0000000 0.3594470 0.5259524 0.0119048 0 1
32 Volvo 142E 0.4680851 0.0 0.1244699 0.2014134 0.6221198 0.3239581 0.4880952 1 1