[R] help on Nan error

Richard.Cotton at hsl.gov.uk
2009-05-15T08:57:13Z

> 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}}