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

whie

> delme3[1065]
[1] "2008-06-09 18:25:46"

Where does the length 9 come from? How is it that I can get the 1065th element of delme3 if the length is just 9? How can I get a vector of POSIX elements with the same length as delme2 so that I can put it in a data.frame?

Thanks!

Agus
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: [EMAIL PROTECTED]
http://www.ija.csic.es/gt/obster

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to