# NOT RUN {
if (require("ggplot2") && require("dplyr") && require("tidyr")) {
data <- iris %>%
group_by(Species) %>%
summarise_all(mean) %>%
pivot_longer(-Species)
data %>%
ggplot(aes(
x = name,
y = value,
color = Species,
group = Species,
fill = Species
)) +
geom_polygon(size = 1, alpha = .1) +
coord_radar() +
theme_radar()
}
# }
Run the code above in your browser using DataLab