# NOT RUN {
# Fit random forest to iris data:
res = randomForest(iris, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"), "Species"
, scriptvars = list(brush.pred = FALSE, use.rows = "all", num.trees = 500
, importance.mode = "permutation"
, respect.unordered.factors = "ignore"
)
, brush = rep(FALSE, nrow(iris)), return.results = TRUE
)
# Show general statistics:
res$statistics
# Prediction
randomForestPredict(iris[, 1:4], c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")
, robject = res$rgobjects
, return.results = TRUE
)
# }
Run the code above in your browser using DataLab