[Rd] [[<-.data.frame with POSIXt replacement (PR#4808)

jrogers at cantatapharm.com jrogers at cantatapharm.com
Mon Oct 27 18:45:18 MET 2003


Hi,

The following seems to be a bug introduced with version 1.8.0 (it worked
without error on my installation of version 1.7.0):

> test <- data.frame(time = I(c("2003-08-19:22:55:57")))
> test[["time"]] <- strptime(test[["time"]], format =
"%Y-%m-%d:%H:%M:%S")
Error in "[[<-.data.frame"(`*tmp*`, "time", value =
strptime(test[["time"]],  : 
	replacement has 9 rows, data has 1
> ## This generates the same error:
> # test$time <- strptime(test$time, format = "%Y-%m-%d:%H:%M:%S")

         _              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    1              
minor    8.0            
year     2003           
month    10             
day      08             
language R            


Thanks,
Jim 

James A. Rogers, Ph.D. <rogers at cantatapharm.com>
Statistical Scientist
Cantata Pharmaceuticals
300 Technology Square, 5th floor
Cambridge, MA  02139
617.225.9009 x312
Fax 617.225.9010



More information about the R-devel mailing list