Okay, but there is a countervailing worry about the amount of bloat in base R:
Can you tell me what all of these do?
> grep("apply", ls("package:base"), value = TRUE)
 "apply" "eapply" "lapply" "mapply" "rapply" "sapply" "tapply" "vapply"
And then there’s:
- A function
rownamesand a function
- Two functions in the parallel package,
parLapply, that appear to do exactly the same thing. Like bitter divorcees,
parLapplyin the documentation, but
mclapply, and neither of them explains the differences between them.
And to match a regular expression, should you use
I could go on. I’ve been programming R for fifteen years, and looking through the documentation today, I have come across functions that I’ve never even heard of, much less used. No wonder it is daunting for a beginner.
In this respect, R is a bit like Windows. It has carefully kept backwards compatibility, and this is surely a big reason for its success — especially with scientists who need old scripts to keep working, for reasons of reproducibility. But it has also added layers of cruft.
The tidyverse has been successful because it gets rid of the cruft and creates a more modern and consistent interface. In that respect, I’d rather have dependencies on a few libraries, if it means more readable code.