-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf Of Katharine Miller
Sent: Thursday, August 04, 2011 4:38 PM
To: r-help at r-project.org
Subject: [R] randomForest partial dependence plot variable names
Hello,
I am running randomForest models on a number of species. I
would like to be
able to automate the printing of dependence plots for the
most important
variables in each model, but I am unable to figure out how to
enter the
variable names into my code. I had originally thought to
extract them from
the $importance matrix after sorting by metric (e.g. %IncMSE), but the
importance matrix is n by 2 - containing only the data for each metric
(%IncMSE and IncNodePurity). It is clearly linked to the
variable names,
but I am unsure how to extract those names for use in scripting. Any
assistance would be greatly appreciated as I am currently typing the
variable names into each partialPlot call for every model I
run.....and that
is taking a LONG time.
Thanks!
[[alternative HTML version deleted]]