data <- datawizard::reshape_longer(
aggregate(iris[-5], list(Species = iris$Species), mean),
c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")
)
ggplot(
data,
aes(
x = name,
y = value,
color = Species,
group = Species,
fill = Species
)
) +
geom_polygon(linewidth = 1, alpha = 0.1) +
coord_radar() +
theme_radar()
Run the code above in your browser using DataLab