Learn R Programming

rfPermute (version 2.1.6)

plotVotes: Vote Distribution

Description

Plot distribution of votes for each sample in each class.

Usage

plotVotes(rf, type = NULL, plot = TRUE)

Arguments

rf

an object inheriting from randomForest.

type

either area for stacked continuous area plot or bar for discrete stacked bar chart. The latter is prefered for small numbers of cases. If not specified, a bar chart will be used if all classes have <= 30 cases.

plot

display the plot?

Value

the ggplot2 object is invisibly returned.

Examples

Run this code
# NOT RUN {
data(mtcars)

rf <- randomForest(factor(am) ~ ., mtcars)
plotVotes(rf)

# }

Run the code above in your browser using DataLab