Skip to content
Prev 79023 / 398502 Next

fast and stable way to read data in R

On Fri, 14 Oct 2005, Wensui Liu wrote:

            
Depends on the data and how large is `pretty large'.

If your data are numeric, 2) will be faster as you will avoid
numeric->character->numeric conversions.  If your data are to be factors,
1) might be as fast.

However, both are pretty much instantaneous unless you have millions 
of items to read (and Excel is unlikely to cope well with such numbers).
I just tested reading 1 million numbers from an 18Mb file in 3s with 
read.table().