Skip to content
Prev 27698 / 29559 Next

Variable importance bar plot

Dear Enoch,

randomForest:varImpPlot() has a parameter called 'class' that is NULL by 
default but can be changed to get the class-specific measure of importance.
'geom= "bar"': do you want to plot the result using ggplot2 instead of 
the base plot produced by varImpPlot()? In this case you should firstly 
assign the invisiby returning result of varImpPlot() (or that of 
importance()) to a variable, and then plot it with ggplot().

HTH,
?kos Bede-Fazekas
Hungarian Academy of Sciences


2019.10.29. 15:51 keltez?ssel, Sarah Goslee ?rta: