2
我想知道为什么下面这段代码不会产生一个在另一个之下的两个图。par(mfcol = c(2,1))和第二行空白
data(mtcars)
library(randomForest)
mtcars.rf <- randomForest(mpg ~ ., data=mtcars, ntree=1000, keep.forest=FALSE,
importance=TRUE)
png("rf1.png", width=6, height=6, units="in", res=100)
par(mfcol=c(2,1))
varImpPlot(mtcars.rf)
plot(mtcars.rf, log="y")
dev.off()
这只是产生
一个空白第二行。