Skip to content

Error in CAPdiscrim() in BiodiversityR

4 messages · Jari Oksanen, Edgar Torres

#
On 13/02/2012, at 20:23 PM, Edgar Torres wrote:

            
So what is the error?

Cheers, Jari Oksanen
#
On 13/02/2012, at 20:23 PM, Edgar Torres wrote:
Edgar,

The problem was that you asked two-dimensional plot of one-dimensional results, and vegan did not know how to handle this. It knows now:  a commit to http://vegan.r-forge.r-project.org/ fixes this for vegan development version, and if no surprises arise, the fix will be in the next CRAN release. 

You have only one axis in CAPdiscrim since your 'Prog' variable is a two-level factor. The maximum number of constrained axes with non-redundant factor constraints is the number of factor levels minus one. The ordiplot() function defaults to use two dimensions and requests those -- and oops! here we go (but this is now fixed).

An immediate solution is to request only one axis when there is only one axis: use argument 'choices':

p1 <- ordiplot(Ordi, choices=1)

Cheers, Jari Oksanen