New Packages for Reading Data into R

[This article was first published on fishR » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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 about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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)