Re: [R] Simple regex problem

2008-05-13 Thread John Kane
Thanks to Gabor Grothendieck & Ted Harding. both solutions work very nicely. --- Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Try this (no gsub required): > > as.chron(as.Date(xx, "%b %d, %Y")) > > On Sat, May 10, 2008 at 12:49 PM, John Kane > <[EMAIL PROTECTED]> wrote: > > I am cleani

Re: [R] Simple regex problem

2008-05-10 Thread Gabor Grothendieck
Try this (no gsub required): as.chron(as.Date(xx, "%b %d, %Y")) On Sat, May 10, 2008 at 12:49 PM, John Kane <[EMAIL PROTECTED]> wrote: > I am cleaning up some character data to convert to > dates using chron. The regex that I am using work fine > but there should be a better way to do this. Can >

Re: [R] Simple regex problem

2008-05-10 Thread Ted Harding
On 10-May-08 16:49:20, John Kane wrote: > I am cleaning up some character data to convert to > dates using chron. The regex that I am using work fine > but there should be a better way to do this. Can > anyone suggest a cleaner bit of code than the gsub, > sub approach? Thanks > >#Test Run on date

[R] Simple regex problem

2008-05-10 Thread John Kane
I am cleaning up some character data to convert to dates using chron. The regex that I am using work fine but there should be a better way to do this. Can anyone suggest a cleaner bit of code than the gsub, sub approach? Thanks #Test Run on dates. xx <- c("May 1, 2007", "May 2, 2007", "May 3, 2