Dan Abner
2012-Oct-19 12:55 UTC
[R] Converting character values to time values when no date information is present XXXX
Hi everyone, I am familiar with using the chron package to work with date/time values, but what about just time values with no date info present? What is the best tool to convert character values to time values when no date info is present? Thanks! Dan
Gabor Grothendieck
2012-Oct-19 13:09 UTC
[R] Converting character values to time values when no date information is present XXXX
On Fri, Oct 19, 2012 at 8:55 AM, Dan Abner <dan.abner99 at gmail.com> wrote:> Hi everyone, > > I am familiar with using the chron package to work with date/time > values, but what about just time values with no date info present? > What is the best tool to convert character values to time values when > no date info is present? >The "times" class in the chron package handles times.> library(chron) > times(.5)[1] 12:00:00> times(.5) + times("01:00:00")[1] 13:00:00> times("01:00:00") + 1Time in days: [1] 1.041667 -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com