From campbell.webb@yale.edu  Sat Nov 23 22:57:33 2002
From: campbell.webb@yale.edu (campbell.webb@yale.edu)
Date: Sat, 23 Nov 2002 23:57:33 +0100 (MET)
Subject: [Rd] Intermittant hang in cmdscale (PR#2323)
Message-ID: <200211232257.XAA17412@pubhealth.ku.dk>

Full_Name: Cam Webb
Version: 1.6.0 (fink X11 compile)
OS: Mac OS X (Jaguar)
Submission from: (NULL) (64.168.28.87)


This is an unpredictable, intermittant hang during cmdscale of the mva library. 
Some data  never cause a problem, other data always do, abut I can't track down
the difference in the structure of the data.  Sometimes the function will work
for `difficult' data after it has been run in the same session for `behaved'
data (eurodist always works)!  Here is a typical session:

$ R

> library(mva)
> x <- read.table("test.dat",row.names=1)

> x
  V2 V3
A  1  2
B  2  4
C  5  7
D  1  1
     
> dist(x)
         A        B        C
B 2.236068
C 6.403124 4.242641
D 1.000000 3.162278 7.211103

> cmdscale(dist(x))
^C

   Here it just hangs, CPU whirring.  Have to abort with ^C

> data(eurodist)

> cmdscale(eurodist)
                        [,1]        [,2]
Athens           2290.274680  1798.80293
Barcelona        -825.382790   546.81148
...
Vienna            911.230500   205.93020
   
> cmdscale(dist(x))
        [,1]       [,2]
A  1.9464399  0.1545044
B -0.2638877  0.4928116
C -4.4454618 -0.2244320
D  2.7629095 -0.4228840

  Works now!

Not sure if this is a Mac problem, or a function problem.  The intermittantness
is most puzzling.

Many thx,

Cam



[Rd] Intermittant hang in cmdscale (PR#2323)
campbell.webb@yale.edu