Data I/O performance tips

April 20, 2010
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

The R tag on StackOverflow recently topped 1000 questions, and continues to be a great community resource for practical tips on using the R language for data analysis and visualization. To take one example, "Efficiency of operations on R data structures" has been answered with some great tips on efficiently getting data in and out of the R system. Here's three quick tips excerpted from user "doug"'s response:

  • For reading in flat files, the performance of read.table can be improved 5x (or more) just by opting out of a few of read.table's default arguments
  • With only a little more hassle, you can make reading flat files even faster by using 'scan' instead of 'read.table', and
  • Paying attention to data types can often give you a performance boost and reduce your memory footprint.

See the post linked below for the complete details on how to implement these tips and power up the process of reading data into R.

StackOverflow.com: Efficiency of operations on R data structures 

To leave a comment for the author, please follow the link and comment on his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.