# NOT RUN {
# Regression
require(randomForest)
set.seed(1234)
data(airquality)
airquality <- na.omit(airquality)
( rf.mdl <- randomForest(x=airquality[,2:6], y=airquality[,1]) )
( rf.perm <- rf.significance(rf.mdl, airquality[,2:6], nperm=99, ntree=501) )
# Classification
require(randomForest)
set.seed(1234)
data(iris)
iris$Species <- as.factor(iris$Species)
( rf.mdl <- randomForest(iris[,1:4], iris[,"Species"], ntree=501) )
( rf.perm <- rf.significance(rf.mdl, iris[,1:4], nperm=99, ntree=501) )
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab