Skip to content
Back to formatted view

Raw Message

Message-ID: <5352B6ADEDFA084ABE4F419E3BEB8B37C5CA9D@srv01.Bioskin.local>
Date: 2011-07-28T13:37:20Z
From: Maciej Hoffman-Wecker
Subject: how to shift a chron timestamp by 6:30 hours

Dear help list,

I have a timestamp in as a chron object:

> (x <- chron(dates = c("12/02/11", "22/11/11"),
+             times = c("07:30:00", "04:00:00"),
+             format = c(dates = "d/m/y", times = "h:m:s")))
[1] (12/02/11 07:30:00) (22/11/11 04:00:00)

Now I want to shift the timestamp by 06:30 (hh:mm) backwards, to get

[1] (12/02/11 01:30:00) (21/11/11 21:30:00)

How can I achieve this? Are there any more detailed examples on
manipulation of chron objects? I have some trouble with this.

Thanks in advance,

Maciej Hoffman-Wecker