[R] Error with metaMDS

Suparna Mitra
Mon, 24 Jun 2013 11:33:38 -0000

H
ello R-experts,
  I want to do ordination plots using vegan metaMDS.
I have a where many cells have zero values.

Data structure:
X[1:10,1:14]
       Height.1 Height.2 Height.3 Height.4 Height.5 Height.6 Height.7
Height.8 Height.9 Height.10 Height.11 Height.12 Height.13
D30I1A       46        0        0        0        0        0        0
 0        0         0        39         0        98
D30I1B       46        0        0        0        0        0        0
 0        0         0        39         0        98
D30I1C       70        0        0        0        0        0        0
 0        0         0         0        85         0
D30I2A       47        0        0        0        0        0        0
 0        0         0        49         0       105
D30I2B       68        0        0        0        0        0        0
 0        0         0        83         0       214
D30I2C        0       75        0        0        0        0        0
 0        0         0         0        83         0
D30I3A       48        0        0        0        0        0        0
 0        0         0        42         0       107
D30I3B       64        0        0        0        0        0        0
 0        0         0        72         0       177
D30I3C       72        0        0        0        0        0        0
 0        0         0         0        96         0
D30M1A       60        0        0        0        0        0        0
 0        0         0        74         0       169

Another data structure
> Genus_data[1:10,1:14]
     Sample Acanthamoeba Acidianus Aegilops Alphapapillomavirus Asfivirus
Brassica Buchnera Coprinellus Diaphorobacter Hartmannella Ignicoccus
1    HS1_S1            0         0        0                   0         0
     0        0           0              0            0          0
2    HS2_S2            0         1        1                   0         0
     0        0           0              0            1          0
3    HS3_S3            0         0        0                   1         0
     0        1           1              1            0          0
4    HS4_S4            0         0        0                   0         1
     0        0           0              0            0          0
5   HS13_S5            0         0        0                   0         0
     0        0           0              0            0          0
6   HS14_S6            0         0        0                   0         0
     1        0           0              0            0          0
7   HS15_S7            0         0        0                   0         0
     0        0           0              0            0          0
8   HS16_S8            0         0        0                   0         0
     0        0           0              0            0          1
9   HS25_S9            1         0        0                   0         0
     0        0           0              0            0          0

I am having two different kind of errors for these two data...
Error 1
> ord1 <- metaMDS(
 X
="bray")
Square root transformation
Wisconsin double standardization
Error in if (any(dist < -sqrt(.Machine$double.eps))) warning("some
dissimilarities are negative -- is this intentional?") :
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In distfun(comm, method = distance, ...) :
  you have empty rows: their dissimilarities may be meaningless in method
“bray”
2: In distfun(comm, method = distance, ...) : missing values in results

Error 2
ord.data= metaMDS(data, distance="bray")
Error in if (any(autotransform, noshare > 0, wascores) && any(comm
< 0)) {
:
  missing value where TRUE/FALSE needed
In addition: Warning message:
In Ops.factor(left, right) : < not meaningful for factors

I searched all the details of metaMDS where it is suggested to avail the
argument 'zerodist'
So I tried both

X.dist1 <- metaMDSdist(X, method="bray",zerodist =
"ignore")
X.dist2 <- metaMDSdist(X, method="bray",zerodist = "add")

Can Please help me with this.
Thanks,
Mitra

	[[alternative HTML version deleted]]