R-bloggers is an aggregator of blog posts from the R programming community, covering statistics, data analysis, and machine learning.
HN commenters call it the hub for everything R, and it comes up in R versus Python discussions and in an XKCD curve-fitting post.
There are few comments here complaining about R performance just like the parent comment. It's a shame that R does not have industrial strength industrial compiler based on this blog article unlike Python [1].
If you want to see the performance benchmark of R against major programming languages for data analysis please check this excellent keynote speech on the R compilation or more accurately on failures of R compilation effort [2].
As mentioned in [1], the main reason people do not focus on providing industrial strength compiler for R is probably because most of R program’s time are spent in the library codes that are written in a compiled language (e.g., C or Fortran). As you can see from [2], even though this is the case (computation intensive being delegated to proper compiled languages), the R programs running time still suffers due to the "impedance mismatch" because of the look up overheads, indirections, etc.
Perhaps someone should try to compile, transpile and/or embed R inside D language similar to the efforts provided in [3][4]. D now supports C compiler internally, has DasBetterC and D interface to C++ (DPP) is second to none. Additionally, since D can also perform better than Fortran codes for numerical computing perhaps Fortran codes can eventually be replaced by existing high performance D library like Mir[5]. I can foresee this symbiotic relationship can be beneficial for R and D (R on D?). D can becomes very popular with extra humongous data analysis…
I use R a lot and I have to say some of these comments are weird.
1. R and Lisp are hardly alike even if it was inspire by it. It's like saying Erlang and Prolog is very similar. If you want learn FP do it in Erlang, Lisp, Haskell, etc.. Don't do it in R, it's half baked.
2. R syntax is ugly with warts. But built in datatype like dataframe, factor type, NA (missing value notion) value, make this language much better than many languages out there for dealing with data. Subsetting dataframe is a breeze even in base R.
3. There are many many advance statistical packages only in R. GLMnet was was in R for 4-5 years before someone decided to port it to Python. You can argue that there might be alternative package. But the statistician that created ridge, elastic, etc... method made GLMnet. There are many statistician out there that just implement their latest method in R. If you want to learn a subject in statistic there is probably a book out there and it'll have an R package and code to come along with it. Next to that will be SAS. There are very few stat book with python packages. You want to learn bayesian statistic? Social Network Analysis? There's a book for it with R code and a package to do that. Good luck finding one in Python for these subfield of statistic. There's a bayesian hierarchical analysis in Ecology and that book is in R.
4. ggplot2 is amazing for static graphic. R doesn't have good dynamic graphic out there and I kinda meh with Shiney. If you hate the…
Here is my opinion on Python and R. I used Pandas and switched to R.
1) Python 0 based as opposed to 1 based is big to me. I don't want to always have to minus on on columns to call them.
2) I much prefer Hadley Wickham's syntax to Pandas which closely follows it, but R piping with %>% is amazing with library magritr. Using dplyr and stringr, tidyr, rvest, httr, luberdate are awesome and consistant.
3) In R I can use dplyr whcih is fast or even use data.table for even more speed that uses a sql like syntax. In Python your choices are limited in comparison to R for tools.
4) HUGE and the reason I switched to R. I can output my graphics into a editable PowerPoint slide. My managers and company doesn't know that there are anything besides MS Office and I can give them slides that they can fiddle with for their own presentations.
5) RMarkDown and knitr for outputing reports in Word (UGH but ti works great), PDF or , LaTex or HTML is fantastic. Reproducable output is great. If I want I can also use Project Jupyter (IPython's new name in next version) with a R kernel.
6) Tools - I got RStudio installed on my work computers, and my personaly server has RStudio Server installed. This is what I have settled into using because it is the best statistic programing tool out there. Works better than Jupyter/IPython for 90% of the time, though I love Love LOVE Jupyter/IPython.
7) The community. R's community is fantastic [http://www.r-bloggers.com/] just look at all the daily…
> R has nothing going for it except a rapidly dwindling number of packages that don't yet have a direct python equivalent.
This is not a true statement.
Here are the data that goes against this statement.
1. https://www.r-bloggers.com/on-the-growth-of-cran-packages/
2. https://blog.revolutionanalytics.com/2017/01/cran-10000.html
3. https://www.r-bloggers.com/rs-remarkable-growth/
From 2015 to 2016: ~6,200 to More than 8,000 in April, 2016
From 2016 to 2017: CRAN now has 10,000 R packages.
> Even then, the incoming generation of undergrads are increasingly proficient with programming and are shying away from R the same way that they shied away from Matlab after scipy matched it for 95% of their tasks.
This is a generalization.
So far you've made opinionated negative generalization with no data.
Python is great because it learn from Matlab and took many great ideas and inspirations from Matlab. But I'm not going to make sweeping negative statements about Matlab or pretend to know how it going when I don't have enough data or experiences in it.
I spent about a year blogging about R as I learned it (http://www.r-chart.com/). It is not a general purpose sort of language but is great for math / charting tasks. A couple of ways that software developer types can minimize time to get up and running:
1) Check out http://www.r-bloggers.com/. The site gives you a good sense of the state of R and Tal (who runs the site) has done a great job of promoting R and encouraging the community.
2) Pick one graphics package and stick with it. The standard functions are sufficient but ggplot2 has a more finished appearance.
3) Review available libraries. If you want to do something, someone else likely already has and has posted a package to CRAN.
4) One way for SQL developers to limit the need of learning the idiosyncrasies of the language is to use the sqldf package to manipulate data frames and use ggplot2 (which generally takes data frames as arguments) to display charts.
It's been a few years since I really looked at R, but I don't think the problems with R are simply that people don't learn the language. Some languages are simply not as good as others. We can all learn more about the tools we use when programming, I know that I certainly could. But this doesn't make it our fault that a language is tricky or hard to debug or hard to understand. If we worked at it, I suppose we could all write more efficient programs by using assembler, but that doesn't mean that assembler is the best possible programming language for, say, statistical programming.
Someone, Ross Ihaka, that knows a thing or two about R wrote a short post 6 years ago and said "simply start over and build something better". Take a look:
http://www.r-bloggers.com/“simply-start-over-and-build-something-better”/
My hope is that Julia will eventually be adopted as a basis for a future statistical programming language.