[R] isoMDS

Jari Oksanen jarioksa at sun3.oulu.fi
Thu Sep 9 13:56:14 CEST 2004


On Thu, 2004-09-09 at 14:25, Doran, Harold wrote:
> Thank you. I use the same matrix on cmdscale as I did with isoMDS. I
> have reproduced my steps below for clarification if this happens to
> shed any light.
<--- snip --->

Doran,

Your data clarified things. It seems to me now, that your data are not a
a matrix but a data.frame. A problem for an ordinary user is that
data.frames and matrices look identical, but that's only surface: you
shouldn't be shallow but look deep in their souls to see that they are
compeletely different, and therefore isoMDS fails. At least isoMDS gives
just that error for a data.frame, but cmdscale casts data.frame to a
matrix therefore it works.

So the following should work (worked when I tied):

tt <- as.matrix(tt)
isoMDS(tt)

(and you could down to a dist object with tt <- as.dist(tt) which seems
to handle data.frames directly, too).

Then you will still need to avoid the complaint about zero-distances
among points. This means that you have some identical points in your
data, and isoMDS does not like them. This issue was discussed here in
April, 2004 (and many other times). Search archives for the subject
"question on isoMDS".

cheers, jari oksanen
-- 
Jari Oksanen <jarioksa at sun3.oulu.fi>




More information about the R-help mailing list