The example from the help page for strptime has the following oddity:

>      dates <- c("02/27/92", "02/27/92", "01/14/92",
+                 "02/28/92", "02/01/92")
>      times <- c("23:03:20", "22:29:56", "01:03:30",
+                 "18:21:03", "16:56:26")
>      x <- paste(dates, times)
>      z <- strptime(x, "%m/%d/%y %H:%M:%S")
>      z
[1] "1992-02-27 23:03:20" "1992-02-27 22:29:56" "1992-01-14 01:03:30" 
"1992-02-28 18:21:03" "1992-02-01 16:56:26"
> 
> length(z)
[1] 9
>
The length is always denoted as 9.
Of course this implies that any replacement I want to do with dates etc. 
always fails with the error:

Error in "[[<-.data.frame"(*tmp*, D[I], value = 
strptime(as.character(x[[D[I]]]),  : 
        replacement has 9 rows, data has 5970
>
> version
         _ 
platform i386-pc-mingw32
arch     i386 
os       mingw32 
system   i386, mingw32 
status 
major    1 
minor    7.0 
year     2003 
month    04 
day      16 
language R 
>
(platform Win2000 professional)

Has anyone else encountered this?

Thanks,
Partha.


	[[alternate HTML version deleted]]


