Re: [R] reformat time from hhmm

2010-06-04 Thread Peter Moore
Thursday, June 03, 2010 2:22 PM > > To: r-help@r-project.org > > Subject: [R] reformat time from hhmm > > > > Hi, > > I'm newish to R, a recent convert from Matlab... So far I'm > > impressed, and > > determined to solve the following problem

Re: [R] reformat time from hhmm

2010-06-03 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Moore > Sent: Thursday, June 03, 2010 2:22 PM > To: r-help@r-project.org > Subject: [R] reformat time from hhmm > > Hi, > I'm newish to

Re: [R] reformat time from hhmm

2010-06-03 Thread nikhil kaza
Minor correction below. Use 0 instead of space if you are using %H On Thu, Jun 3, 2010 at 8:55 PM, nikhil kaza wrote: > ?ifelse > > > t2 <- ifelse(nchar(times)<4, paste("0", times, sep=""), times) > > > strptime(t2, "%H%M") > > Nikhil > > > > On Thu, Jun 3, 2010 at 5:21 PM, Peter Moore wrote: >

Re: [R] reformat time from hhmm

2010-06-03 Thread nikhil kaza
?ifelse > t2 <- ifelse(nchar(times)<4, paste(" ", times, sep=""), times) > strptime(t2, "%H%M") Nikhil On Thu, Jun 3, 2010 at 5:21 PM, Peter Moore wrote: > Hi, > I'm newish to R, a recent convert from Matlab... So far I'm impressed, and > determined to solve the following problem, which seems

[R] reformat time from hhmm

2010-06-03 Thread Peter Moore
Hi, I'm newish to R, a recent convert from Matlab... So far I'm impressed, and determined to solve the following problem, which seems like it should be easy: I have a long (millions of points) data series recorded with a datalogger that produced a timestamp in 4 columns: Year, Day of Year, Time in