Re: [R] replace parenthetical phrases in a string

2012-12-13 Thread arun
-- Original Message - From: "Adams, Jean" To: r-help@r-project.org Cc: Sent: Thursday, December 13, 2012 6:03 PM Subject: Re: [R] replace parenthetical phrases in a string My apologies.  I sent too soon! I did a bit more digging, and found a solution on the R-help archives. y &l

Re: [R] replace parenthetical phrases in a string

2012-12-13 Thread Adams, Jean
My apologies. I sent too soon! I did a bit more digging, and found a solution on the R-help archives. y <- gsub(" *\\([^)]*\\) *", "", x) Jean On Thu, Dec 13, 2012 at 4:53 PM, Adams, Jean wrote: > R-helpers, > > I have a vector of character strings in which I would like to replace each > p