[R] (no subject)

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Feb 16 16:28:14 CET 2005


Jim Gustafsson <jgu at codan.dk> writes:

> R-people
> 
> I wonder if one could change a list of table with number of the form 
> 1,200.44 , to 1200.44
> 
> Regards
> JG

On input, I assume?

Read as character variable, get rid of the comma(s) using (g)sub, then
use as.numeric.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list