Hacker News new | ask | show | jobs
by amrrs 3113 days ago
I have seen HN crowd hating R very similar to hating js. While I'm not getting into those details, I'd like to list a few reasons why I like R:

- RStudio is simply great. I know Python has got Jupyter notebook but RStudio makes a good IDE for anyone (even beginners).

- Python is great because it's easier for beginners to start doing magick without getting frustrated hence a good beginners language and it is more appropriate for R because anyone who wants to begin with Data Analytics, R is a lot easier - without trying to figure out how to install a new package, load a new package, make a plot or anything of that matter. Hence the fall out rate would be less.

- Tidyverse. Without denial, it's a better Universe than Marvel's cinematic universe. Not a single day in my job goes without using dplyr.

- While I've quoted tidyverse in general, ggplot2 - embracing the grammar of graphics has set a very nice standard for visualization libraries which matplotlib (the goto library of Python doesn't offer much)

- Pandas is nothing but a library built on Numpy to offer R like data wrangling functions hence I'd like to consider dplyr and R's inbuilt data manipulation functions superior.

There is no doubt that Python has its own advantages with single library scikit-learn and webservices, R is no way to be hated.

Even millenial companies have found interest in R https://medium.com/airbnb-engineering/using-r-packages-and-e...

Edit:

Missed RShiny to simply create a web app (unlike in Python starting a Flask server and then writing stuff on top of it)

4 comments

I don't understand the Jupyter hype. Sure it's clever that it runs in a browser but it's less capable than the MathCAD I remember using in the 90s.
Indeed. I used Maple for the same thing.

I think the hype is due to the fact that the literate programming thing is a good idea but many people haven't seen it before and there aren't many tools for doing it. I just wish I could use a proper editor with Jupyter. Editing in the browser is horrible.

I believe emacs org can be used for this kind of notebook developement, however it looked like a configuration nightmare so I still haven't dived into it.
It's actually pretty easy to set up for general use. I do know and use emacs lisp, but I've not really used any at all for org-mode.

It does support "sessions" which allow persistence across the code throughout the document (you could even have multiple sessions), but the wat it's done for Python is quite hacky. It uses an interactive Python shell so you have to write code as if you're using the shell (double returns etc.) There is a better way using ob-ipython, but after spending a long time getting it to work at all I found it not good enough. Using Jupyter kernels is the way to go, I think, but it would be a lot of work to get it working well with org-mode.

You should give it a go, it's not hard to configure, and it allows you to trivially use several languages in the same file, which is really practical in many cases. It also exports nicely to HTML and PDF (via LaTeX)
If I remember correctly, PyCharm does support Python notebooks. I've used it and it's not terrible.
Apparently PyCharm supports using emacs as an external editor. Interesting. Thanks for the hint.
The key attraction of Jupyter (from what I can tell) is one which is underappreciated in tech.

It provides an accessible, better workflow for common use cases than what most people were using before.

Sure, there are things out there that do a better job. Or are more powerful. But something which requires highly-custom config & training to be hyper productive on by definition means most people aren't using it that way. Same argument for Python as a popular language.

It's free and it Just Works. That's about it.
It's free and it Just Works.

It's painfully clunky for those of us who remember something far slicker 20+ years ago!

Plot.ly now has Dash, which is RShiny for Python (which uses Flask) and appears equally capable to RShiny.
Bokeh is also similar, and quite customizable!
Is there any difference in using Jupyter Notebook (via R Kernel) and R-Studio specifically for R programming ? I already have Jupyter Notebook installed and I wanted to learn R, so do I need to install R-studio separately?
R Studio allows you to use R Notebooks, which have a number of advantages over Jupyter (I wrote a blog post on exactly this earlier this year: http://minimaxir.com/2017/06/r-notebooks/)
RStudio is a full-fledged IDE and you should definitely use it. It has movable panes for code, console, help files, history, plots, etc. There's nothing comparable in Python land.
Rodeo is rstudio for python
Since the acquisition of Yhat by Alteryx (Yhat created Rodeo) the Rodeo project seems dead. Another good alternative is Spyder which offers a similar type of IDE and one that is still being developed.
Didn't know about this one. Must be pretty new. Thanks.
Visual Studio tools for Python, PyCharm?
Disclaimer: I work for RStudio. I previously worked heavily with SciPy.

The difference kind of goes to the fundamental difference between R and Python. R's nature as a statistical programming language is something you have to install packages in python to achieve: numpy, matplotlib, etc.

What you gain with RStudio are environment inspection tools[1] built for the kind of vectors, data frames, etc. that you'd only get with `numpy` in Python land, and therefore PyCharm and VS don't know about (or would need a plugin to know about). Same goes for the plot viewer and `matplotlib`.

Beyond that, a sizeable portion of RStudio's runtime is written in R itself; you can actually write addins for the IDE using R, as opposed to PyCharm where you'd have to know Java or Kotlin, and I assume VS where you'd be required to use .NET.

It's always going to come down to "what is the best tool _for the job_?" Knowing people who use python for data science, they don't seem to indicate to me that they're particularly fond of PyCharm (which is what I'd use for Python if it's too big a project to effectively grok in VIM). They tend to use Jupyter notebooks (not even iPython!) because more important than static inspection and quality tools (which devs care about) is a richly-featured REPL that saves detailed history forever (which a researcher cares about).

[1]https://i.stack.imgur.com/ASgJs.jpg

Thanks for the clarification, but at least with Visual Studio tools for Python, some of that is also possible.

https://docs.microsoft.com/en-us/visualstudio/python/debuggi...

Extensions can be written in IronPython, http://ironpython.net/

The builtin repl supports IPython/Jupyter style, with inline plots, .NET and WPF integration.

https://docs.microsoft.com/en-us/visualstudio/python/interac...

Yes! These are the exact things why I love R! Although I love Python too.