New Packages for Reading Data into R

April 15, 2015

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

Hadley Wicham has announced two new package for reading external data into R that will likely be of great interest to fisheries scientists.

  • readr — Several new functions that replace the traditional read.csv() and read.table() (among others).  Hadley’s announcement is here, but I especially like the uniformity of arguments in and the speed of the new functions.
  • readxls — A new package for reading Excel data into R.  Hadley’s announcement is here, but the thing that I find most appealing is that the package does not depend on any softwares or languages outside of R, which is in contrast to other packages with functions for loading data into R (that may rely on Perl, Java, etc.).

If you use dplyr with the output of either of these packages, then only the first 10 rows will be printed when you type the name of a data.frame.  I find this behavior to be annoying for most of my applications.  You can work-around this by increasing the number of lines that will be printed with options(dplyr.print_max = 1e9) or you can wrap the data.frame in (for example, use df <-  The value of the dplyr function far outweighs this annoyance and the need to use this work-around.

Filed under: Fisheries Science, R Tagged: Data Manipulation, dplyr, Excel, R

To leave a comment for the author, please follow the link and comment on their blog: fishR » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, 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...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)