[R] plane3d
Uwe Ligges
ligges at statistik.uni-dortmund.de
Tue May 31 18:05:49 CEST 2005
Jim Milks wrote:
> I am attempting to fit a logistic regression plane to a 3-D scatterplot
> (which was generated using scatterplot3d). I've noticed that the help
> pages of scatterplot3d include a function titled "plane3d." However,
> when I attempt to use the function, I get the following message:
>
> Error: couldn't find function "plane3d"
>
> I've searched the archives and found no references to such a function.
> Is (or was) plane3d an actual function or is there just a typo in the
> scatterplot3d help page? If it is a function, how would I tap into it?
Please read ?scatterplot3d carefully and completely. The function is
*retunred* in form of a closure from a call to scatterplot3d() and there
is an example how to use it in the examples section of the help file:
library(scatterplot3d)
## example 5
data(trees)
s3d <- scatterplot3d(trees, type="h", highlight.3d=TRUE,
angle=55, scale.y=0.7, pch=16, main="scatterplot3d - 5")
# Now adding some points to the "scatterplot3d"
s3d$points3d(seq(10,20,2), seq(85,60,-5), seq(60,10,-10),
col="blue", type="h", pch=16)
# Now adding a regression plane to the "scatterplot3d"
attach(trees)
my.lm <- lm(Volume ~ Girth + Height)
s3d$plane3d(my.lm, lty.box = "solid")
Uwe Ligges
> Thanks.
>
> Jim Milks
> Graduate Student
> Environmental Sciences Ph.D. Program
> Wright State University
> 3640 Colonel Glenn Hwy
> Dayton, OH 45435
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list