[R] Error after performing anosim function with vegan

Brenzo kbrenzinger at gmx.de
Wed May 20 10:58:53 CEST 2015


Hello,

so I'm relatively new in R, but normally i don't have big problems by using
R. 

But today i struggle a lot with an error message that occurred the first
time.

Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 
  'x' must be atomic

I'm using just a normal anosim function and 2 weeks ago it was working fine
with the same files and the same script. So maybe some of you can help me.

Here is the total script:

> data <-read.csv("H:\\PhD\\Ergebnisse Versuch Norwegen\\T-RFLP\\nirK
> Adonis2.csv")
> fix (data)
> data1 <- (data [,-1])
> fix (data1)
> cca.env<- read.csv ("H:\\PhD\\Ergebnisse Versuch
> Norwegen\\T-RFLP\\env2.csv",
+ header= TRUE, )
> fix(cca.env)
> du<- vegdist(data)
> fix(du)
> attach(cca.env)
> dune.ano <- anosim(du, Sample)
> summary(dune.ano)

Call:
anosim(dat = du, grouping = Sample) 
Dissimilarity: bray 

ANOSIM statistic R:  
      Significance: 0.001 

Permutation: free
Number of permutations: 999

Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 
  'x' must be atomic

it is more or less exactly the same matrix than in the example from R:

> data(dune)
> fix(dune)
> data(dune.env)
> fix(dune.env)
> dune.dist <- vegdist(dune)
> attach(dune.env)
> dune.ano <- anosim(dune.dist, Management)
> summary(dune.ano)

Call:
anosim(dat = dune.dist, grouping = Management) 
Dissimilarity: bray 

ANOSIM statistic R: 0.2579 
      Significance: 0.008 

Permutation: free
Number of permutations: 999

Upper quantiles of permutations (null model):
  90%   95% 97.5%   99% 
0.115 0.151 0.192 0.250 

Dissimilarity ranks between and within classes:
        0%   25%    50%     75%  100%   N
Between  4 58.50 104.00 145.500 188.0 147
BF       5 15.25  25.50  41.250  57.0   3
HF       1  7.25  46.25  68.125  89.5  10
NM       6 64.75 124.50 156.250 181.0  15
SF       3 32.75  53.50  99.250 184.0  15

Greetings Kristof




--
View this message in context: http://r.789695.n4.nabble.com/Error-after-performing-anosim-function-with-vegan-tp4707444.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list