Hi,

I have a vector like this:

DF <- c("Aetna, Inc.", "Alexander's Inc.", "Allegheny Energy, Inc")

For each element in the vector I would like to remove the "incorporated"
info, so that my vector looks like this:

DF <- c("Aetna", "Alexander's", "Allegheny Energy")

That means that I have to strip:

strip <- c(", Inc.", " Inc.", ", Inc")

How do I pass multiple patterns/splits to gsub/strsplit?

Thanks!

Math


--
View this message in context: 
http://r.789695.n4.nabble.com/gsub-strsplit-with-multiple-patterns-splits-tp4631873.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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