[R] XLConnect readWorksheet comma decimal sign
dwinsemius at comcast.net
Fri Nov 29 18:31:23 CET 2013
On Nov 29, 2013, at 6:18 AM, Knut Krueger wrote:
> Am 25.11.2013 13:06, schrieb Knut Krueger:
>>> how can I read exel files where the decimal sign is comma instead dot.
>>> I get the data as ascii and when converting "3,5" with as.numeric the 3,5 will be converted to NA
> I think here is a major bug because no warning is genereated.
You were already advised how to change the defaults for R's input functions' behaviors with respect to decimal separators. (I would add that you should also become familiar with the 'colClasses' argument.)
> It is impossible to change excel to dot decimal separator.
> First reason it is unusual in our (and I think also other countries).
> Lot of computers in the university are using decimal separator mostly without R. The user would be unable (or simply do not want) to use it furthermore.
> A question
> does anybody know whether Rcmdr and XLConnect are using the same or different ways to import Excel?
Rcmdr: same ; XLConnect:different
You should read the help pages for XLConnect.
> We found also that RCmdr is setting comma separated values to na if there is an NA in the column.
> Maybe it more useful to discuss this in the devel group? (set the follow up to DEVEL)
No. This is more a sign of your lack of experience with R. There are wiki-pages with advice about various ways to do Excel input. (You surely cannot think you are the first to experience this. This has been a difficulty for 15 years, and more with Excel than with R.)
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Alameda, CA, USA
More information about the R-help