Displaying 1 result from an estimated 1 matches for "iwithin".
Did you mean:
within
2009 May 15
1
help on Nan error
....mds$points, labels = rownames(Y))
> box()
> tasmania.mds$stress
[1] 10.66349
> tasmania.stress=round(tasmania.mds$stress/100,digits=3)
> mtext(paste("Stress = ",tasmania.stress,sep=""))
> group=rownames(Y)
> N=length(group)
> d.vec=rep(0,(N*(N-1)/2) )
> iwithin=rep(0,(N*(N-1)/2) )
> icount=0
> for(i in 1:(N-1)) {
+ for(j in (i+1):N) {
+ icount=icount+1
+ d.vec[icount]=D[i,j]
+ if(group[i]==group[j]) iwithin[icount]=1
+ }
+ }
> r=rank(d.vec)
> r
[1] 8 15 16 74 116 36 60 59 64 44 19...