Re: [R] Simple as.Date question dealing with a timezone offset

2009-09-18 Thread esawdust
Took me a minute to grok the gsubfn solution, but that is sweet! very nice. thank you very much both for the suggestions, Landon -- View this message in context: http://www.nabble.com/Simple-as.Date-question-dealing-with-a-timezone-offset-tp25491955p25512218.html Sent from the R help mailing

[R] Simple as.Date question dealing with a timezone offset

2009-09-17 Thread esawdust
I've been trying to understand the as.Date functionality and I have a date and time stamp field that looks like this: Tue Sep 15 09:22:09 -0600 2009 and I need to turn it into an R Date object for analysis. Simple date conversions I have down, no problem: adate = c(7/30/1959)

Re: [R] Simple as.Date question dealing with a timezone offset

2009-09-17 Thread David Winsemius
On Sep 17, 2009, at 11:25 AM, esawdust wrote: I've been trying to understand the as.Date functionality and I have a date and time stamp field that looks like this: Tue Sep 15 09:22:09 -0600 2009 and I need to turn it into an R Date object for analysis. Simple date conversions I have

Re: [R] Simple as.Date question dealing with a timezone offset

2009-09-17 Thread Gabor Grothendieck
Using strapply() from the gsubfn package, apply the pattern (2nd arg) to string (1st arg). The matches to the back references (i.e. the portions of the pattern in parens) are passed to separate arguments of the These arguments are date, offset and year respectively. Then the function calculates