From ripley at stats.ox.ac.uk  Mon Oct 27 19:59:35 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon Oct 27 19:58:33 2003
Subject: [Rd] [[<-.data.frame with POSIXt replacement (PR#4808)
In-Reply-To: <200310271745.h9RHjI0P013228@pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.44.0310271857530.28467-100000@gannet.stats>

It is not a bug in 1.8.0.  It was a bug in 1.7.0 (and .1).
X
You cannot assign a POSIXlt value to a data frame correctly.

Please do RTFM, especially the NEWS file.  We don't need smart alecks 
here.

On Mon, 27 Oct 2003 jrogers@cantatapharm.com wrote:

> 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@cantatapharm.com>
> Statistical Scientist
> Cantata Pharmaceuticals
> 300 Technology Square, 5th floor
> Cambridge, MA  02139
> 617.225.9009 x312
> Fax 617.225.9010
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 
> 

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


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