Here is another approach:

> x <- "\"$ 1,200,300,400.50\""
>  x
[1] "\"$ 1,200,300,400.50\""
> gsub("[,$ \"]", "", x)
[1] "1200300400.50"
> as.numeric(gsub("[,$ \"]", "", x))
[1] 1200300401
>


On Wed, Nov 21, 2012 at 4:41 PM, Mauricio Cornejo
<mauriciocorn...@yahoo.com> wrote:
> x <- "\"$ 1,200,300,400.50\""



-- 
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

______________________________________________
R-help@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.

Reply via email to