[R-sig-eco] package vegan biplot data

Jari Oksanen jari.oksanen at oulu.fi
Mon May 16 19:18:58 CEST 2011


On 16/05/11 19:55 PM, "Scott Chamberlain" <scttchamberlain4 at gmail.com>
wrote:

> Weird. I keep getting a subscript out of bounds error.

Scott,

Sorry for a wrong hint: I was led astray with the term "biplot" which in
this case refers to site scores (or species) instead 'biplot' scores (or
arrows for constraining variables). In your cases you don't even have the
biplot scores as you have non-constrained ordination. So you must request

scores(mod, dis="site", scaling=3)
scores(mod, dis="spec", scaling=3)

depending on the kind of scores you need.

It is clearly undesirable to have a "subscript out of bounds" error when
trying to access non-existing scores: we must fix this and have a more
informative error message.

Cheers, Jari Oksanen
> On Monday, May 16, 2011 at 11:07 AM, Jari Oksanen wrote:
>> On 16/05/11 18:55 PM, "Scott Chamberlain" <scttchamberlain4 at gmail.com>
>> wrote:
>> 
>>> Hello, How can I access the data that is used to draw the arrows on a biplot
>>> in package vegan?
>>> For example, mod[8] in the code below gets me a bunch of data about the
>>> ordination axes, and perhaps the data for the biplot arrows is in there, but
>>> I
>>> don't know which is used for the arrows.
>>> 
>>> Thanks, Scott
>>> 
>>> 
>>> require(vegan)
>>> data(dune) 
>>> mod <- rda(dune, scale = TRUE)
>>> biplot(mod, scaling = 3)
>>> mod[8]
>> Check 
>> 
>> scores(mod, display="bp", scaling=3)
>> 
>> see ?scores.rda for details.
>> 
>> Cheers, Jari Oksanen
>>



More information about the R-sig-ecology mailing list