Does this help?

library(chron)
tms<-c("19:30:23","18:39:10")
mytimes <- times(tms)
mytimes[1]-mytimes[2]


--- On Thu, 11/6/08, tedzzx <[EMAIL PROTECTED]> wrote:

> From: tedzzx <[EMAIL PROTECTED]>
> Subject: [R]  How to manipulate the time data without the date?
> To: r-help@r-project.org
> Received: Thursday, November 6, 2008, 12:10 PM
> Hi,all
> 
> I only got the time data such as:
> tms<-c("19:30:23","18:39:10".....)
> 
> I want to manipulate this time series data. For example,
> plus one second(or
> minute) or minus one second
> 
> This data only has the time(h:m:s), without the date. I
> know that there are
> chron package, ISOPix class and the timeDate class, but all
> these class need
> the input of date. 
> 
> How can we manipulate the time data without the date?
> 
> Thanks advance
> 
> Ted
> -- 



      __________________________________________________________________
[[elided Yahoo spam]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to