[R-sig-eco] The problems on BIO-ENV procedure by [R]

Jari Oksanen jari.oksanen at oulu.fi
Tue Dec 6 08:53:11 CET 2011




On 05/12/2011 10:28, "坪井 隼" <tsuboi-shun-gw at ynu.ac.jp> wrote:

> Dear Madam / Sir,
> 
> I have two questions for the use of the “R” program for the ecological
> research. I am studying the relationship between the community
> structures of environmental microbes and some environmental conditions.
> For this objective, I have known that the BIOENV procedure, which was
> developed by Clarke & Ainsworth (1993), is available on the “R” software.
>   
> 
> Fist question; 
> I attempted the use of the procedure to analyze the relationship between
> the variation of the microbial community structures and the
> environmental factors. However, I can not analyze the relationship based
> on isoMDS function. The isoMDS was inacceptable for my dataset. The
> command for the BIOENV procedure, which I programmed, and the error
> massage I gained was as follow;
> 
>> library(MASS)
>> library(vegan) 
>> communitydat<-read.table("C:/Documents and Settings/shuntsuboi/desktop
> /bray.txt", head- er=T)
>> environdat<-read.csv("C:/Documents and Settings shuntsuboi/desktop/ev.
> csv",header=T)
>> env<-environdat[,c("variablesA","variablesB.","variablesC","variablesD
> ","variablesE")]
>> d <- vegdist(communitydat, "bray")
>> isoMDS(d)
> error   isoMDS(d) : zero or negative distance between objects 1 and 2
> 
> As mentioned above, I can not run the program because the error, which
> is “isoMDS(d) : zero or negative distance between objects 1 and 2”,
> occurred. What are the ways to solve this problem ? On isoMDS function,
> what are the ways that the zero distance of “Bray-Curtis distance” is
> acceptable in the function ?
> 
> Second question; 
> Based on the command as above, I ran the metaMDS function. However,
> although I could automatically describe the two dimensional ordination
> plot figure, I could not gain the X and Y value of the respective plots.
> Then, the error massage was shown as follow;
> “In ordiplot(x, choices = choices, type = type, display = display,  :
> Species scores not available”
>  
Dear Shun Tsuboi,

First answers to direct vegan questions:
1) use scores() function to extract the scores of the metaMDS result.
2) the message about "Species scores not available” is not an error but a
warning. One difference between errors and warnings in R is that errors are
called "errors" and warnings are called "warnings" in the output. This is an
informative message that tells you that there are no species scores.
Probably this happened because you supplied dissimilarities to metaMDS()
instead of the full data, and dissimilarities have no information about
species that were used in calculation.

Then a question: you read file 'bray.txt' as your 'communitydat' and then
you later calculate Bray-Curtis dissimilarites as 'd <-
vegdist(communitydat, "bray")'. Is this only misleading or a user error? The
file name sounds like you already had dissimilarities as the input, and if
this is the case, you should not calculate dissimilarities of
dissimilarities.

Cheers, Jari Oksanen



More information about the R-sig-ecology mailing list