[R] Drawing a 3-D plot for PCA?

Gavin Simpson gavin.simpson at ucl.ac.uk
Fri Dec 22 09:37:36 CET 2006


On Thu, 2006-12-21 at 16:28 -0600, Frank Duan wrote:
> Hi All,
> 
> Can anyone point me a hint (package) how to draw a 3D plot using the first 3
> components from PCA?
> 
> Thanks a lot,
> 
> FD

See ?ordiplot3d and ?ordirgl in package vegan. rda() in that package can
be used to perform PCA, which can then be drawn in 3D using the rgl
package or the scatterplot3d package, the former allowing dynamic
rotation and zooming of the ordination configuration.

HTH

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [t] +44 (0)20 7679 0522
ECRC                              [f] +44 (0)20 7679 0565
UCL Department of Geography
Pearson Building                  [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street
London, UK                        [w] http://www.ucl.ac.uk/~ucfagls/
WC1E 6BT                          [w] http://www.freshwaters.org.uk/
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list