Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20111030T083642-200@post.gmane.org>
Date: 2011-10-30T07:43:28Z
From: Jari Oksanen
Subject: Redundancy canonical analysis plot problem in 3D using VEGAN,	RGL, SCATTERPLOT3D and SFSMISC

<Thomas.Rousseaubeaumier <at> uqtr.ca> writes:

> 
> Hi Guys,
> 
> First, English is not my native language so sorry if the question is  
> too difficult to understand. I can rephrase it if necessary.
> 

> I noticed the following? code to explain as clearly as possible the  
> problems encountered.
> 
> I am not able to add " species scores " from RDA results in 3D plot  
> like i can in 2D plot.
> 
> With the code i used , i get errors like ;
> 
> ERROR dans t$sites : $ operator is invalid for atomic vectors,
> 
> Erreur dans match.arg (display, items) : 'arg' should be one of  
> ?xyz.convert?, ?points3d?, ?plane3d?, ?box3d?, ?points?, ?arrows?
> 
> I saw that I can use other functions, but it is impossible to extract  
> the 3D scores ( and add species to 3d plot ), Other fonctions works  
> but, add elements in a 2D space.
> 
> How can I add the "species scores" (sites and arrows are added  
> correctly) to the 3D plot as with the 2D plot.
> 
Thomas,

Function ordiplot3d() can only add one kind of scores (and I have no plans of 
changing this, but contributions are welcome). Adding species scores as text 
is possible but needs a bit work.

One of the items you received from the plotting was xyz.convert (see your error 
message above). This is a function that changes 3D coordinates onto your
plotting plane. You may proceed like this:

sp <- scores(ENVIESRDA, choices=1:3, display="species")
text(pl$xyz.convert(sp), rownames(sp)) 

HTH,

Jari Oksanen