[R] remove Punctuation characters

From: Filipe Almeida <milheiros_at_gmail.com>
Date: Wed 10 May 2006 - 01:50:34 EST


I want to remove all punctuation characters in a string. I was trying it use a regular expressions but it doesn't work. Here is a sample os what i want:

str <- 'ABD - remove de punct, and dot characters.' str <- gsub('[:punct:]','',str)
"'ABD remove de punct and dot characters"

is there any function that do this kind of thing?

Thanks to all.

Filipe Almeida

        [[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 Received on Wed May 10 01:54:20 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 10 May 2006 - 04:09:59 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.