> When i want to do ANOSIM i get an NaN error message. What is wrong? > > (lots of other code) > > iwithin=rep(0,(N*(N-1)/2) ) > > r.w=sum(r*iwithin)/sum(iwithin)
iwithin is a vector of zeroes and so is its sum. r*iwithin is also a vector of zeroes, and so is its sum. Thus r.w=sum(r*iwithin)/sum(iwithin) is zero divided by zero, which is not defined. Regards, Richie. Mathematical Sciences Unit HSL ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}} ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.