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

From: Brian G. Peterson <brian_at_braverock.com>
Date: Mon, 23 Jul 2012 12:58:18 -0500

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 23 Jul 2012 - 18:00:45 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 23 Jul 2012 - 18:10:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive