Re: [R] Converting from char to POSIX:

2008-07-28 Thread Prof Brian Ripley
On Mon, 28 Jul 2008, Agustin Lobo wrote: Given char vector delme2: str(delme2) chr [1:1065] "30-1-08 8:48:21" "30-1-08 8:55:17" "30-1-08 9:00:22" ... I do: delme3 <- strptime(delme2,format="%d-%m-%y %H:%M:%S") But then: str(delme3) POSIXlt[1:9], format: "2008-01-30 08:48:21" "2008-01-30

[R] Converting from char to POSIX:

2008-07-28 Thread Agustin Lobo
Given char vector delme2: > str(delme2) chr [1:1065] "30-1-08 8:48:21" "30-1-08 8:55:17" "30-1-08 9:00:22" ... I do: > delme3 <- strptime(delme2,format="%d-%m-%y %H:%M:%S") But then: > str(delme3) POSIXlt[1:9], format: "2008-01-30 08:48:21" "2008-01-30 08:55:17" ... > length(delme3) [1] 9 wh