服务热线
178 0020 3020
library(fmsb)
data1 <- tail(mtcars, n =4) ##extract the last 4 rows
data1 <- data1[,1:9] ##extract the first 9 coloums
### another solution: data <- mtcars[-(1:28),1:9]
radarchart(data1, axistype=1, seg=2, plwd=2, maxmin = FALSE, title = "R02-38")
legend("left", c("Ford Pantera L","Ferrari Dino", "Maserati Bora", "Volvo 142E"), col = c("black","red","green","blue"), lty = 0.3, pch = c(16,16,16,16),cex = 0.6,bty = "n")
### axistype argument defines the type of axes, 1 means center axis label only
### seg argument defines the number of segments for each axis
setwd("D:/projects/R learning/week 5 data")
library(devtools)
install_github("ricardo-bion/ggradar")
library(ggradar)
library(ggplot2)
data2 <- read.csv("R2_5_data.csv", header = T)
ggradar(data2, axis.label.size = 5, grid.label.size = 5, group.line.width = 1, group.point.size = 4, legend.text.size = 11, plot.title = "R2-38")+theme(legend.title = element_blank(), legend.position = "top")
附件