Closed Maleeha closed 4 years ago
how's this?
> source <- "$34,000.00"
> gsub("[$,\\.]", "", source)
[1] "3400000"
What if i want to match the two 0's after the period as well? @wibeasley
Okay this worked:
> source <- "$34,000.00"
> gsub("[$]|[,]|[\.][0-9]{2}", "", source)
[1] "34000"
I have the following regular expression to capture
$
,,
,.
and digits after period.It is for the following character variable. I am giving one value here:
I want to get rid of all the captured groups. What do i substitute it with in the following statement.
@wibeasley ... I am not able to tag anyone else.
Thanks!