Why Learn R Programming Language?
Why Learn R Programming Language?
R is weird, if you are coming from other programming languages, especially those that come out of the C tradition — which is the most common base for languages — be it Perl, Python, Basic or any of C languages. Some of the operators are weird, the function names non-obvious, the arrays start with 1 rather 0.
Some of the functions are cumbersome to type too — the dpylr pipe as %>% can be annoying to type repeatably — which is why RStudio contains shortcuts to speed programming. Likewise, the same can be said about the <- assignment operator, which also is obnoxious to type compared to what most other languages use.
But what makes great R pretty awesome is it is an actually quite compact language for creating graphs, charts and even maps due to the pipe mechanism and many very powerful, well designed libraries. The libraries are also easy to explore and understand — you can call R functions without parameters and if they aren’t compiled C code, will output the code that makes up the function.
Matplotlib is powerful in Python, but it really isn’t as fast and easy to use ggplot2 and the grammar of geometry. Matplotlib does many things good, but it’s a lot more fiddly and the labeling functions don’t work all that well without writing a bunch of your own code. There is plotnine for Python which attempts to bring the best of ggplot2 to Python, but I find a lot of the best functions in R are missing. So it kind of sucks.