search for: pdplots

Displaying 1 result from an estimated 1 matches for "pdplots".

Did you mean: gplots
2010 Nov 16
1
Force evaluation of variable when calling partialPlot
..._",root.name,".csv",sep="") data <- read.csv(data.in) vars <- c("sm1","precip.spring","tmax.fall","precip.fall") #selected variables in data frame xdata <- as.data.frame(data[,vars]) ydata <- data[,5] ntree <- 2000 rf.pdplots <- function() { sel.rf <- randomForest(xdata,ydata,ntree=ntree,keep.forest=TRUE) par(family="sans",mfrow=c(2,2),mar=c(4,3,1,2),oma=c(0,3,0,0),mgp=c(2,1,0)) for (i in 1:length(vars)) { print((vars)[i]) partialPlot(sel.rf,xdata,vars[i],which.class=1,xlab=vars[i],main=&qu...