[Rd] eurodist example dataset is malformed

Jari Oksanen jari.oksanen at oulu.fi
Sun Aug 16 20:16:53 CEST 2009


Justin,

I suggest you try to remove your malformed eurodist and use the one in R.
The svn logs show no changes in eurodist since 2005 when 'r' was added to
'Gibralta' (it still has all the wrong distances which perhaps go back to
the poor quality of Cambridge Encyclopaedia). I also installed R 2.9.1 for
MacOS to see that there neither is a change in 'eurodist' in the Mac
distribution. My virgin eurodist in Mac was clean, with all its errors. All
this hints that you have a local copy of malformed eurodist in your
computer. Perhaps

rm(eurodist)
eurodist

will help.

Cheers, Jari Oksanen


On 15/08/09 06:13 AM, "Justin Donaldson" <jjdonald at indiana.edu> wrote:

> Here's my osx data/session info (identical after a re-install):
> 
>> class(eurodist)
> [1] "data.frame"
>> sessionInfo()
> R version 2.9.1 (2009-06-26)
> i386-apple-darwin8.11.1
> 
> locale:
> en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>> 
> 
> -Justin
> 
> 
> 
> On Thu, Aug 13, 2009 at 4:48 AM, Gavin Simpson <gavin.simpson at ucl.ac.uk>wrote:
> 
>> 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/<http://www.ucl.ac.uk/%7Eucfagls/>
>>  UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
>> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
>> 
>> 
>> 
>



More information about the R-devel mailing list