[R] Minute Difference

David Winsemius dwinsemius at comcast.net
Fri Oct 5 17:28:44 CEST 2012


On Oct 5, 2012, at 5:56 AM, Rantony wrote:

> Hi,
> 
> Here i have a time along with date,
> for eg:-  "10/5/2012 5:05:00 AM"
> 
> i need to do minus 10 minutes along current date
> Like this :- "10/5/2012 4:55:00 AM"
> 

There are both 'cut' and 'seq' methods for vectors of class POSIXt. These support operations that specify particular units. 

?cut.POSIXt  # has link to the seq method help page

I am not posting code when questions fail to adhere to the reproducible code request.

-- 

David Winsemius, MD
Alameda, CA, USA




More information about the R-help mailing list