There are lots of valid criticisms of R, but this article doesn't touch on them. It's so off-base that it's the proverbial "not even wrong".
There are lots of valid criticisms of R, but this article doesn't touch on them. It's so off-base that it's the proverbial "not even wrong".
Cleaning a broken csv or whatever: no, it is crap for that. You use awk/sed/tr and all that for such problems.
If you're the type who don't want to deal with R, I guess you can use it from the CLI. A couple of the R deploys I've done work like this.
The real problems with R are .... oh man .... so many. R inferno covers a lot of them as a language/environment. Weak database connectivity is another one. The thing which makes me batshit is the nodejsbro-ification of the package management system. Aka people chaining together things like node works; R's package manager isn't designed for this. But also the way code, packaged and otherwise simply rots between the many, many upgrades.
You could probably run and deploy scikit learn/pandas based code from 5 years ago without much problem. In R, you have to make a build with the salted package dependencies ... and for all I know stuff it in docker.
Anyway unlike python, it basically has every data transformation and statistical tool under the sun. I guess this is the price we pay.
EDIT: And yes, as citrate05 says, it's just an additional set of libraries. There's no changes to the language itself.
Edit: This of course goes hand-in-hand with the claim that it is easier/faster to write R scripts. If you're not familiar with it, the tidyr and dplyr packages in particular (part of the tidyverse) are fantastic in the verbs they provide for thinking about data cleaning.
R has inbuilt great parallel tools (check for example the doSnow and future frameworks);
the best packages for data manipulation are mostly written in C (for example data.table and a good part of the tidyverse);
and with frameworks like Drake you can easilly create a Dag out of it that can process complex iterations millions of times. Check the uses of the Rcpp package that makes interfacing C code to R a breeze.
But of course, if you were comparing R to a pure compiled language, you are out of luck.
managing python dependencies is no fun either, tbf
There is definitely more that R offers than what I discuss here. In retrospect, I will be more restrained on my opinions when I have little experience in my pocket. That being said, it was absolutely my intention to present CLI that deviate from R's intended use. There is already plenty out there on R's intended use.
What's that adage that goes something like, "if you want to get an answer on the Internet, don't pose a question..."?
I'm relatively new to technical writing and the discussion from all of these comments (yours included) has been really helpful for guiding how I write future posts.
HN is (in my experience) a lot more cynical and straightforward than other places[1]. It's something I've learned to appreciate and also take it with a grain of salt.
I agree with you where some here don't. I think there are often better tools for any single data cleaning task.
R's strength is being second best at an enormous range of tasks (and often being first to get new techniques) and packaging that with analysis and visualization.
Not a specific dig against you, but I find it useful to write (and say) anything with the assumption that the author I'm (hypothetically) addressing is a direct witness.
It really helps with online civility :)
I use Rscript all the time. I was taught to use it by one of R's developers. While not typical, it is absolutely an "intended" use case.
In fact, if you would like to learn more, Software Carpentry has an entire module on using R as a CLI: https://swcarpentry.github.io/r-novice-inflammation/05-cmdli...