4 ms·
I don't argue that R is not insane ;-) As for (a bunch of) functions in the basic library (which, essentially, is a set of packages that you can discard or sim
by Cosi1125 8y ago
I don't argue that R is not insane ;-)
As for (a bunch of) functions in the basic library (which, essentially, is a set of packages that you can discard or simply not use), I dare say it has little to do with the language itself. I don't like Python's regular expressions library, for example, but it's only a set of functions (or methods) that you can write on your own!
The same goes for R's data-wrangling routines; there's this tidyverse, and you can write good, reliable, production-grade code without using a single function from the base library. Heck, you can even write your own DSL (think: Grammar of Graphics) if you think it could improve your code!
There are several quirks built so deeply into the core of the language that you cannot overcome them ("why can't I overload `+` for character strings??"), but they have nothing to do with the rather poor and unintuitive basic library.
- kgwgk 8y ago> there's this tidyverse, and you can write good, reliable, production-grade code without using a single function from the base library A different take on the subject (https://r4stats.com/2017/03/23/the-tidyverse-curse/ https://r4stats.com/2017/03/23/the-tidyverse-curse/): > On the other hand side – I have met a guy using R in production. And he told me that he needs code that stayed the same for 5+ years. That is why he does not use dplyr or any tidyverse, it is still changing too much.
- Cosi1125 8y agoThat's right! And I always keep telling my peers that they should think twice before they decide to use tidyverse packages in the production code. What I meant is that in R you always have choice - and even if you feel that the existing solutions don't meet your expectations, you can always write your own (even if it means writing a DSL like Hadley et al. did in ggplot2 or rlang).