if (FALSE) {
## ------------------------------------------------------------
## classification example
## ------------------------------------------------------------
## You can build a randomForest
rfsrc_iris <- rfsrc(Species ~ ., data = iris)
varsel_iris <- var.select(rfsrc_iris)
# Get a data.frame containing minimaldepth measures
gg_dta <- gg_minimal_depth(varsel_iris)
print(gg_dta)
## ------------------------------------------------------------
## regression example
## ------------------------------------------------------------
# ... or load a cached randomForestSRC object
rfsrc_airq <- rfsrc(Ozone ~ ., data = airquality, na.action = "na.impute")
varsel_airq <- var.select(rfsrc_airq)
# Get a data.frame containing minimaldepth measures
gg_dta<- gg_minimal_depth(varsel_airq)
print(gg_dta)
# To nicely print a rfsrc::var.select output...
print(varsel_airq)
# ... or load a cached randomForestSRC object
data(Boston, package="MASS")
rfsrc_boston <- randomForestSRC::rfsrc(medv~., Boston)
varsel_boston <- var.select(rfsrc_boston)
# Get a data.frame containing minimaldepth measures
gg_dta<- gg_minimal_depth(varsel_boston)
print(gg_dta)
# To nicely print a rfsrc::var.select output...
print(varsel_boston)
}
Run the code above in your browser using DataLab