[R] XLConnect readWorksheet comma decimal sign

Peter Keller kellerp.l at gmail.com
Tue Dec 3 23:06:51 CET 2013


I can't tell since you didn't post any code, so forgive me if you've 
tried this.  XLConnect has a colTypes parameter so you could try 
specifying the relevant columns to be read in as character, set 
forceConversion = TRUE, and then use as.numeric.  Something like this: 
as.numeric(sub(",", ".", Input, fixed = TRUE)) from 
http://stackoverflow.com/questions/15236440/as-numeric-with-comma-decimal-separators. 
  That will change the commas to dots and should eliminate the 
conversion to NA problem you were having.



More information about the R-help mailing list