: gdillon gdil...@fs.fed.us
To: r-help@r-project.org
Subject: Re: [R] Force evaluation of variable when calling partialPlot
Message-ID: 1289852948670-3043750.p...@n4.nabble.com
Content-Type: text/plain; charset=us-ascii
RE: the folloing original question:
I'm using the randomForest package and would
...@fs.fed.us, r-help@r-project.org
cc
Subject
Re: [R] Force evaluation of variable when calling partialPlot
Greg,
Two thoughts:
1. It might be possible that 'vars' is a reserved word of sorts and if you
change the name of your vector RF might be happier
2. A way that works for me is to call
RE: the folloing original question:
I'm using the randomForest package and would like to generate partial
dependence plots, one after another, for a variety of variables:
m - randomForest( s, ... )
varnames - c( var1, var2, var3, var4 ) # var1..4 are all in
data frame s
for( v in
The plot titles aren't pretty, but the following works for me:
R library(randomForest)
randomForest 4.5-37
Type rfNews() to see new features/changes/bug fixes.
R set.seed(1004)
R iris.rf - randomForest(iris[-5], iris[[5]], ntree=1001)
R par(mfrow=c(2,2))
R for (i in 1:4) partialPlot(iris.rf,
Dear R Users,
I'm using the randomForest package and would like to generate partial
dependence plots, one after another, for a variety of variables:
m - randomForest( s, ... )
varnames - c( var1, var2, var3, var4 ) # var1..4 are all in
data frame s
for( v in varnames ) {
partialPlot( x=m,
5 matches
Mail list logo