服务热线
178 0020 3020
install.packages('fmsb') library(fmsb) maxmin <- data.frame( mpg=c(21.4, 15), cyl=c(8,4), disp=c(351, 121), hp=c(335,109), drat=c(4.22, 3.54), wt=c(4,2), qsec=c(20,10), vs=c(1, 0), am=c(1,0) ) newdata1 <- mtcars[29:32,1:9] newdata2 <- rbind(maxmin,newdata1) radarchart( newdata2, axistype=1, seg=2, centerzero = FALSE, title="R2-02", plty=1 ) legend( -2.8, 0.5, c("Ford Pantera L","Ferrari Dino", "Maserati Bora", "Volvo 142E"), col = c("black","red","green","blue"), lty = 1, pch = 20,bty = "n")
library(curl) library(devtools) #下面的语句如果出现 connect time out错误,请下载翻墙软件psiphone #下面的语句如果出现 C:/programe 不是一个程序,请确认R的安装位置路径中是否有空格,如果有重新安装 devtools::install_github("ricardo-bion/ggradar",dependencies=TRUE) library(ggplot2) library(ggradar) data<-read.csv("D:/R2_5_data.csv",header = TRUE) p=ggradar( data, axis.label.size = 4, grid.line.width = 1, group.point.size = 4, group.line.width = 1, legend.text.size = 8 )+ theme(legend.position = "bottom") p+ggtitle("R2-02")
附件