[R] R ON Mac

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Thu Jan 14 17:00:14 CET 2010


Don MacQueen wrote:
> However, for there to be a difference between Mac and PC means that
> something else is going on.
> 
> I would guess that the PC is set to a LOCALE for which "," is the
> default decimal separator, and the Mac is set to a LOCALE for which "."
> is the default decimal separator. (If locale settings affect the
> separator, that is. I don't know for sure whether they do. See ?locales
> to start learning more...)
> 
> Either that or the input files are different on the two different
> computers.

Locale settings are not supposed to affect how R reads files. They might
well affect how other programs write them, though. E.g. cut-and-paste or
save-as-text from a spreadsheet will come out differently in English and
German locales.

> 
> -Don
> 
> At 7:07 AM -0800 1/14/10, Corey Sparks wrote:
>> Hi, it appears that your corrdinates contain commas, instead of decimal
>> points, R sees the commas and immediatly thinks the data are text, you
>> should replace the commas with decimal points in  a text editor.
>>
>> Corey
>>
>> gedasg wrote:
>>>
>>>  hello, I have strange error.
>>>
>>>  > gyliai<-read.table(file.choose(),header=T)
>>>>  summary(gyliai)
>>>           x                y           gylis     307577,08:  1  
>>> 6124296,56:  1   3,00   : 59   308613,01:  1   6124353,50:  1  
>>> 2,80   : 51   313800,45:  1   6124530,65:  1   3,10   : 36  
>>> 313840,17:  1   6124970,20:  1   2,90   : 32   313864,05:  1  
>>> 6124991,68:  1   2,70   : 22   313869,26:  1   6125009,34:  1  
>>> 3,43   :  5   (Other)  :393   (Other)   :393   (Other):194
>>>>  coordinates(gyliai)=~x+y
>>>  Error in .checkNumericCoerce2double(obj) :
>>>    cannot retrieve coordinates from non-numeric elements
>>>
>>>  Your version of R is up to date
>>>
>>>
>>>  Error in .checkNumericCoerce2double(obj) :
>>>    cannot retrieve coordinates from non-numeric elements - whats is that
>>>  ????
>>>
>>>  I use Gstat, mass, and sp packages. any ideas why this error shows
>>> to me?
>>>  I check it on windows couple days ago it worked fine, but not on my
>>> mac, I
>>>  don't have windows pc at the moment :) so help me :)
>>>
>>>  Gedas
>>>
>>
>> -- 
>> View this message in context:
>> http://*n4.nabble.com/R-ON-Mac-tp1013829p1013925.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://*stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://*www.*R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> 


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-help mailing list