Re: [R] as.Data with minutes resolution

2008-11-10 Thread Henrique Dallazuanna
Try this: diff(strptime(time1, "%d/%m/%y-%H:%M")) On Mon, Nov 10, 2008 at 10:38 AM, Ronaldo Reis-Jr. <[EMAIL PROTECTED]>wrote: > Hi, > > I have a vetor os dates with day and hour:minutes. > > > time1 <- c("03/08/08-11:00","03/08/08-11:10") > > time1 <- as.Date(time1,"%d/%m/%y-%R") > > summary(ti

Re: [R] as.Data with minutes resolution

2008-11-10 Thread Gabor Grothendieck
You can use chron: library(chron) time1 <- c("03/08/08-11:00","03/08/08-11:10") diff(as.chron(time1, "%d/%m/%y-%H:%M")) Also you can use POSIXct but in that case be careful about time zones. See R News 4/1. On Mon, Nov 10, 2008 at 7:38 AM, Ronaldo Reis-Jr. <[EMAIL PROTECTED]> wrote: >

[R] as.Data with minutes resolution

2008-11-10 Thread Ronaldo Reis-Jr.
Hi, I have a vetor os dates with day and hour:minutes. > time1 <- c("03/08/08-11:00","03/08/08-11:10") > time1 <- as.Date(time1,"%d/%m/%y-%R") > summary(time1) Min. 1st Qu. Median Mean 3rd Qu. Max. "2008-08-03" "2008-08-03" "2008-08-03" "2008-08-03" "2008-08-03" "2