服务热线
178 0020 3020
第一题
library(fmsb)summary(mtcars)
color_1 <- c("red","yellow","darkslategray", "green")
maxmin <- data.frame(
mpg= c(35,10),
cyl = c(8,4),
disp = c(500,50),
hp=c(350,50),
drat=c(5.0,2.5),
wt = c(5.5,1.5),
qsec = c(23.0,14.5),
vs = c(1,0),
am = c(1,0)
)
mtcars <- mtcars[,1:9]
dat_1 <-rbind(maxmin,mtcars[29:32,])
radarchart(dat_1, axistype = 1, seg = 2, centerzero = F,plty = 1, pcol = color_1, cglcol = "black")
legend("left",lty = 1, lwd = 2.5, cex= 0.75, legend = rownames(mtcars[29:32,]),pch = 20, col = color_1,pt.cex = 1.25,bty = "n")
第二题:
install.packages("devtools")
devtools::install_github("ricardo-bion/ggradar", dependencies=TRUE, force = T)
library(ggplot2)
library(ggradar)
R2_04_5 <- read.csv("/users/taowang/documents/R/R2/R2-5/R2_5_data.csv",header = T)
ggradar(R2_04_5,axis.label.size = 5, grid.label.size = 4, legend.text.size = 10)+
theme(legend.title = element_blank(), legend.position = "top")+
ggtitle("R2-04")
Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
polygon edge not found
In addition: There were 46 warnings (use warnings() to see them)
好吧,再见了各位,我实在是搞不定了。
附件