Thanks again for the help.
-Greg Dillon
"Tim Howard"
11/16/2010 05:36 AM
To
,
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 na
>>>>>>>
Date: Mon, 15 Nov 2010 12:29:08 -0800 (PST)
From: gdillon
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 fo
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
>
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,
4 matches
Mail list logo