From brian at braverock.com  Mon Jul 23 19:58:18 2012
From: brian at braverock.com (Brian G. Peterson)
Date: Mon, 23 Jul 2012 12:58:18 -0500
Subject: [Rd] Reading many large files causes R to crash - Possible Bug
 in R 2.15.1 64-bit Ubuntu
In-Reply-To: <006001cd68f3$25d52640$717f72c0$@gmail.com>
References: <000001cd6843$bf5700a0$3e0501e0$@gmail.com>
	<500C66F9.5050503@gmail.com>
	<002d01cd6895$dbef6ed0$93ce4c70$@gmail.com>
	<CAPPM_gS=a-XoYT3-zUttsQpdqg3KgJnZY172ekGvbyGUk6mGPA@mail.gmail.com>
	<001801cd68d5$233a52c0$69aef840$@gmail.com>
	<CAPPM_gQvV9ht-s_o-K=CazasTNFiT_+yRqnwzA1Wg=rYG+87Pw@mail.gmail.com>
	<001a01cd68d8$d6c96580$845c3080$@gmail.com>
	<CAPPM_gRhUUoCcRaTwhsyVZjGgdoN7Y3kAndyBdREBSwHqj7waA@mail.gmail.com>
	<006001cd68f3$25d52640$717f72c0$@gmail.com>
Message-ID: <500D90BA.3050605@braverock.com>

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



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