[R] Problem with scatterplot3d example

Tom La Bone booboo at gforcecable.com
Thu Jul 24 14:02:29 CEST 2008


I tried to run the following example from section 4.1.4 of the "Scatterplot3d
-
an R package for Visualizing Multivariate Data" vignette and got an error on
the part that plots the regression plane:

> library(scatterplot3d)
> data(trees)
> s3d <- scatterplot3d(trees, type = "h", color = "blue",
+ angle = 55, scale.y = 0.7, pch = 16, main = "Adding elements")
> my.lm <- lm(trees$Volume ~ trees$Girth + trees$Height)
> s3d$plain3d(my.lm)

Error: attempt to apply non-function

> s3d$points3d(seq(10, 20, 2), seq(85, 60, -5), seq(60, 10, -10),
+ col = "red", type = "h", pch = 8)

Any ideas on what I need to change in order to get the plane to plot?

Tom



-- 
View this message in context: http://www.nabble.com/Problem-with-scatterplot3d-example-tp18630468p18630468.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list