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

141 Views Asked by At

I am using the vegan package for R and I am trying to do an ANOSIM but keeps getting this error message when doing the summary():

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

Everything else works, it is just the summary that results in this error. This is my code:

abund <- read.csv("fish.csv", sep=";", header=T)
site <- read.delim("station.txt", sep="\t", header=T)

distancematrix <- vegdist(abund, method="bray")
ANOSIMsite <- anosim(distancematrix, site$station)
summary(ANOSIMsite)

I have really tried everything and read all answers I could find on similar problems but without any luck...

I think the problem lies in the "distancematrix" but I don't know how to fix it.

Thank you so much in advance!

0

There are 0 best solutions below