varImpPlot: Variable Importance Plot

Description Usage Arguments Value Author(s) See Also Examples

View source: R/varImpPlot.R

Description

Dotchart of variable importance as measured by a Random Forest

Usage

1
2
3

Arguments

x

An object of class randomForest.

sort

Should the variables be sorted in decreasing order of importance?

n.var

How many variables to show? (Ignored if sort=FALSE.)

type, class, scale

arguments to be passed on to importance

main

plot title.

...

Other graphical parameters to be passed on to dotchart.

Value

Invisibly, the importance of the variables that were plotted.

Author(s)

Andy Liaw andy\_liaw@merck.com

See Also

randomForest, importance

Examples

1
2
3
4
5
set.seed(4543)
data(mtcars)
mtcars.rf <- randomForest(mpg ~ ., data=mtcars, ntree=1000, keep.forest=FALSE,
                          importance=TRUE)
varImpPlot(mtcars.rf)

Example output

randomForest 4.6-12
Type rfNews() to see new features/changes/bug fixes.

randomForest documentation built on May 2, 2019, 3:26 p.m.