# Classify cars in the Cars93 data set by type (Compact, Large,
# Midsize, Small, Sporty, or Van).
# Load data.
data(Cars93, package="MASS")
x <- Cars93
y <- Cars93$Type
# Select variables with which to train model.
vars <- c(4:22)
# Run model, grow 15 trees.
forest <- bigrfc(x, y, ntree=15L, varselect=vars, cachepath=NULL)
# Build a second forest.
forest2 <- bigrfc(x, y, ntree=10L, varselect=vars, cachepath=NULL)
# Merge the two forests.
big.forest <- merge(forest, forest2)
Run the code above in your browser using DataLab