[R] 3D plotting in R

Richard A. O'Keefe ok at cs.otago.ac.nz
Fri Sep 19 07:40:38 CEST 2003


A student is trying to cluster some data.  Tree-building things seem to
be pretty hopeless (we've tried most of the ones in R, I think).
Multi-dimensional scaling produces somewhat tantalising results:
things do clump together somewhat, but the clusters overlap a lot.
I was wondering if these was an artefact of squeezing it down to 2D,
and whether 3D might be better.  So
loc <- cmdscale(dist(scale(log(data))), k=3)
plot(loc)
_but_ I still get a 2D plot.

I know about persp(), and a bunch of other things in R that give me
a 3d view of a 2d field (plots of a function of 2 arguments, in other
words).  But I want to plot a bunch of 3D points and label them.

If the worst comes to the worst, I'll dump them out in a file and use
XLispStat to view them.

I've asked previously whether there's a spinning plot in R, and have been
told that there isn't and why.  I've been given one anyway, but it calls
Tcl/Tk, and for some reason that doesn't work in my setup.




More information about the R-help mailing list