"Jean-Louis Abitbol" <[EMAIL PROTECTED]> wrote:

> Dear R Helpers,

> I need to read time from a .csv file which is formated as chartime
> (09:12:00) below. I need to add one minute (cf chartime2).
> Then I need to output the value just as 09:13 without the seconds for
> writing a csv file and input in another program.

[...]

The numeric representation of chron objects is expressed in day units, and
there are sensible arithmetic methods:

chrontime <- times("09:12:00") + 1/24/60

and then:

paste(hours(chrontime), minutes(chrontime), sep=":")


Cheers,

-- 
Seb

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to