[Rd] eurodist example dataset is malformed

Gavin Simpson gavin.simpson at ucl.ac.uk
Thu Aug 13 10:48:47 CEST 2009


On Wed, 2009-08-12 at 20:26 -0400, Justin Donaldson wrote:
> The eurodist dataset (my favorite for mds) is malformed.  Instead of a
> standard distance matrix, it's a data frame.  The rownames have gotten
> 'bumped' to a new anonymous dimension "X".   It's possible to fix the data,
> but it messes up a lot of example code out there.
> 
>           X Athens Barcelona Brussels Calais ...
> 1    Athens      0      3313     2963   3175
> 2 Barcelona   3313         0     1318   1326
> 3  Brussels   2963      1318        0    204
> 4    Calais   3175      1326      204      0
> 5 Cherbourg   3339      1294      583    460
> 6   Cologne   2762      1498      206    409
> ...
> 
> Best,
> -Justin

What version of R, platform, loaded packages etc? This is not what I see
on Linux, 2.9.1-patched r49104.

> class(eurodist)
[1] "dist"
> sessionInfo()
R version 2.9.1 Patched (2009-08-07 r49104) 
x86_64-unknown-linux-gnu 

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;
LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;
LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
base     

loaded via a namespace (and not attached):
[1] tools_2.9.1

Have you tried this in a clean session to see if it persists there?

If you can reproduce this in a clean session with an up-to-date R or
R-Devel then send details of your R back to the list for further
investigation.

HTH

G
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-devel mailing list