randomForest (version 3.4-1)

var.imp.plot: Variable Importance Plot

Description

Barchart of variable importance as measured by a Random Forest

Usage

var.imp.plot(x, sort=TRUE, label=TRUE, main=deparse(substitute(x)), ...)

Arguments

x
An object of class randomForest.
sort
Should the variables be sorted in decreasing order of importance?
label
Should the variable names be added to the importance?
main
plot title.
...
Other graphical parameters.

Value

  • Invisibly, the importance of the variables.

See Also

randomForest

Examples

Run this code
data(mtcars)
var.imp.plot(randomForest(mpg ~ ., data=mtcars, ntree=1000, keep=FALSE,
                          importance=TRUE))

Run the code above in your browser using DataCamp Workspace