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.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
as.data.frame() (for example, use df <- as.data.frame(df)). The value of the
dplyr function far outweighs this annoyance and the need to use this work-around.