Re: [R] Removing characters and periods from character strings

2008-10-15 Thread Greg Snow
tistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Behalf Of John Poulsen > Sent: Wednesday, October 15, 2008 1:43 PM > To: r-help@r-project.org > Subject: [R]

Re: [R] Removing characters and periods from character strings

2008-10-15 Thread Henrique Dallazuanna
Try this; gsub("\\.|[0-9]", "", pick) On Wed, Oct 15, 2008 at 4:42 PM, John Poulsen <[EMAIL PROTECTED]> wrote: > Hello R-users, > > I have code that gives me the important variables from an analysis. I need > to input these variables into a different analysis. To do this, I need to > modify th

Re: [R] Removing characters and periods from character strings

2008-10-15 Thread Prof Brian Ripley
A case for [g]sub: gsub(".", "", sub("[0-9]*$", "", pick), fixed = TRUE) On Wed, 15 Oct 2008, John Poulsen wrote: Hello R-users, I have code that gives me the important variables from an analysis. I need to input these variables into a different analysis. To do this, I need to modify them

[R] Removing characters and periods from character strings

2008-10-15 Thread John Poulsen
Hello R-users, I have code that gives me the important variables from an analysis. I need to input these variables into a different analysis. To do this, I need to modify them slightly... 1) remove all numbers at the end of the variables, 2) remove all periods. I tried to do it with the aw