[Rd] Reading many large files causes R to crash - Possible Bug in R 2.15.1 64-bit Ubuntu

Brian G. Peterson brian at braverock.com
Mon Jul 23 19:58:18 CEST 2012


On 07/23/2012 11:49 AM, David Terk wrote:
> One quick question regarding a call to as.character.POSIXt.  When using
> scan, since scan reads line by line, would it make sense to have the ability
> to perform a char -> POSIXct conversion on each line that is read, rather
> than after all lines have been read?  Perhaps this already exists somewhere
> and I am not aware of it.

It's actually much faster to load everything into memory and then 
convert it all to xts at once. as.POSIXct will work on a vector to 
create your index, this s better than calling it millions of times, once 
for each row.

-- 
Brian



More information about the R-devel mailing list