use 'gsub'

> x <- c('1,200.44', '23,345.66')
> gsub(',','',x)
[1] "1200.44"  "23345.66"
> as.numeric(gsub(',','',x))
[1]  1200.44 23345.66
>
__________________________________________________________
James Holtman        "What is the problem you are trying to solve?"
Executive Technical Consultant  --  Office of Technology, Convergys
[EMAIL PROTECTED]
+1 (513) 723-2929


                                                                                
                                                           
                      Jim Gustafsson                                            
                                                           
                      <[EMAIL PROTECTED]>               To:       
r-help@stat.math.ethz.ch                                                      
                      Sent by:                     cc:                          
                                                           
                      [EMAIL PROTECTED]        Subject:  [R] (no subject)       
                                                       
                      ath.ethz.ch                                               
                                                           
                                                                                
                                                           
                                                                                
                                                           
                      02/16/2005 09:08                                          
                                                           
                                                                                
                                                           





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


------------------------------------------------------------------------------

This e-mail and any attachment may be confidential and may also be
privileged.
If you are not the intended recipient, please notify us immediately and
then
delete this e-mail and any attachment without retaining copies or
disclosing
the contents thereof to any other person.
Thank you.
------------------------------------------------------------------------------

             [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to