Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’m using R for a while in my current position, alongside some other programming languages, Python and C++. R is bar far the hardest to predict and read. Rstudio is terrible. It’s a wrapper around a “web app” and that simply doesn’t work well for something as complicated as IDE. To give an example, Rstudio does only one thing at the time, you are running a code, you cannot open a data frame even to look at it. Rstudio doesn’t at all behave likes any other IDE that you’ve seen either. Try to increase the font size and the whole idea scales up!

R by itself is a mess, and I don’t think I have to say much about that. R community is big and that’s good and bad. It’s good because amazing people are developing amazing packages for it. It’s bad because there is a lot of bad packages. It’s a lot like JavaScript community. I have a feeling the community has started to reward “having a package”, and everyone has a package.

Besides the quality of R packages and R being a strange programming language, R gets the job done. However, if your job is anything beyond some statistics and data processing, then good luck. I’m not saying that you cannot achieve what you want to achieve using R, however, good luck reading R code. I found it extremely hard to read R codes and so far 90% of codes that I’ve encountered have little to no comments.



> R being a strange programming language

I'm probably an outlier, but I have to say that the language itself is one of my favorite things about R.

Vector based, super powerful indexing of vectors, functional programming basics, lazy parameter evaluation, super convenient parameter matching and defaults, all these things make it super productive for me and let me deal with data far better than other languages. Matlab is similar in its ability to deal with data, but that's a language that feels far clunkier to me. Python has caught up with some of its packages, but it definitely feels bolted on instead of native to the language.


I actually love RStudio for what it does. In general I'm a huge CL advocate; RStudio is basically the only time I'd rather use an IDE than the terminal. Looking at data, code, and plots simultaneously is easy - I haven't found anything as elegant for Python, including pycharm.

Yes the language itself has problems. It's 1-indexed for God's sake! But if you stick to what it's good at (dplyr, ggplot2), you can get a lot of mileage. What Linus Torvalds said about C++ programmers probably applies doubly to R programmers - so yea comments are going to be sparse. And if you venture far from its core competence of data, you're gonna have a bad time. But overall Hadly Wickham and the tidyverse are driving the ecosystem forward, and R has found a great niche between python scripting and Excel/Matlab


Now that you mentioned tidyverse, let me discuss the ugly side of R. You are right, R community and ecosystem is being pushed forward by Rstudio, the company and people behind it. Tidyverse is truly great and R without it would have not been where it is now. However, Rstudio is a company and they want to earn money, sure, they are contributing heavily to the open-source R but that might change, or they use their influence to steer the development. I’m not saying that they would but they could. I see it more and more that R codes relies on APIs that Rstudio expose. What if Rstudio decides to keep more of its product locked. You can see a part of this already, Rstudio team (company) sells essential security as a feature. What if this extends to R and Tidyverse. Sure, there is license and what not to protect it but that could change. Looking back at the history, this is how the whole Matlab has started!

Again, I’m not saying that it will happen, but it could. Dependent of R on third party packages and a company to push it forward it’s not necessarily a good thing.

P.S. Python IDEs are crappy too!


Tidyverse is currently GPL3 licensed, so that code will remain open even if they were to change the license for future releases. If they made it so onerous and restrictive then presumably less people would use it, to the detriment of the community. People may just move over to another language like Python.


R language has many quirks. Here was an effort to list them: https://www.burns-stat.com/pages/Tutor/R_inferno.pdf

Also, the author of R language said the performance of R is sub-optimal. In his own words: https://www.stat.auckland.ac.nz/~ihaka/downloads/JSM-2010.pd...

Currently I am using PyCharm with R plugin that JetBrains released very recently. R Studio is very slow and buggy.


That’s a very colorful document, reminiscent of the excellent Unix Haters Handbook, but the first chapter is standard floating point stuff, common to every language. It doesn’t inspire confidence that the writer bothered to learn anything about the domain before deciding to write and complain.

Chapters two and three are the lesson to not use procedural language fundamentals if you want performance, and to instead use functional equivalents. Not exactly a language quirk.

If somebody has only ever used 2000s-era Java and C# and those types of languages, functional style programming will be a strange beast. But python has enough functional style things such as lost comprehensions, and I hear Java and C++ have gained functional style programming too, so in this day and age I’m not sure that functional style programming should be considered quirky.

The runtime performance is all due to the current implementation, not the language itself. I think JavaScript has far more quirks, it then it was also invented in an insanely short amount of time so that’s not too surprising.


> Also, the author of R language said the performance of R is sub-optimal.

That's from 2010, even before JIT compilation in R became a thing. And since then, much has been done in terms of the computational performance of R.


Do any people still use Tinn-R? CTRL-F found not a single mention. That's what I learned on and still go to on the occasions I need to script some R.


> Python has caught up with some of its packages, but it definitely feels bolted on instead of native to the language.

This is what Julia aims to solve.


> To give an example, Rstudio does only one thing at the time, you are running a code, you cannot open a data frame even to look at it.

This isn't specific to R or RStudio. Start running a slow process in your Python IDE of choice, and while it's running try to execute df.head() to view some data frame - you won't be able to see it regardless of the language or IDE (and for a good reason).


I understand that good reason, it’s because scripting languages run on sessions. So, Rstudio couldn’t execute any new command while doing something else. That’s fine. What’s annoying and not ok is the fact that sometimes the entire interface freezes. UI has to be separated from the session and logic of the program. Rstudio doesn’t do this well.


Background jobs in Rstudio are coming:

https://blog.rstudio.com/2019/03/14/rstudio-1-2-jobs/

Also not sure you can criticize a whole language because some random code you read doesn’t have comments.


There actually here. They're really great for developing shiny apps. Set the shiny.autoreload option to TRUE. Run the app in the background and point your viewer to the URL et voila


Even if your job is beyond statistics and data processing, you're probably using R because the core of what your team is doing is statistics and or data processing. If that's the case, and if you're the computationally sophisticated member of the team, then shouldn't the onus be on you to understand/adapt to what your less "sophisticated" peers are using?


I’m not sure why you brought this up. I didn’t talk about who should do what and whether people are doing things wrong. I said R is strange and hard to read and Rstudio is bad and should be more capable.

Now, if I want to address your comment. I don’t think “this was the way things have been done here, let’s do it like that from now on” is a good approach. If there is a better way, even if it’s more complicated, at least it has to be tried and tested. If a more “sophisticated” tool proves to be useful, let it be. Not everyone in a team has to use the same set of tools, and if they see the benefit in something more “sophisticated”, they might want to try it, even if it was not explored before. People can learn, there is always a better way/tool and one tool cannot do it all.


You're entitled to your opinion. But perhaps it is more constructive to email R dev mailing list and suggest your ideas for improvement.


There are a lot of really fantastic packages, too. Many are the only implementation of a certain stats tool in the world.


> It’s a lot like JavaScript community.

Erm, not at all. You don't need a hundred packages to run a trivial application. Even R-base is reasonably powerful, and it goes to a complete different level once you use tidyverse as a layer to code everything for R.


Felt the same way for years coming from the python world. The R for Data Science book[0] was a game changer in making R enjoyable for me.

[0] https://r4ds.had.co.nz/


If you want to look at data frames as you run sections of your code you will have to use r markdown chunks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: