Live data from Hacker News

Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

minimaxir.com

31–40 of 51 posts

Re: Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

#33
post #26

The article claims that > R Notebooks can only be created and edited in RStudio Luckily, this is wrong . Since R Notebooks are simply R Markdown, they can be edited with any editor (although the integration is obviously lost). This is, in fact, one of its decisive advantages over Jupyter Notebooks: most of the other issues mentioned in the article are solvable, whereas this issue fundamentally isn’t.

But the nice interactivity of it is only in RStudio iirc, which is a major selling point.

Yep, the RStudio integration is very nice. However, there are other ways of authoring R Notebooks that also allow interactivity, and the only thing that’s missing then is having output inline inside the editable document. Apart from that, if you for example use Nvim-R or ESS, you can write R Markdown, execute chunks selectively, and get a visual, interactive representation of the results in real time that way. And once the document is done, a single press of a button will render the resulting Markdown/HTML/PDF document.

Re: Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

#34
post #26

The article claims that > R Notebooks can only be created and edited in RStudio Luckily, this is wrong . Since R Notebooks are simply R Markdown, they can be edited with any editor (although the integration is obviously lost). This is, in fact, one of its decisive advantages over Jupyter Notebooks: most of the other issues mentioned in the article are solvable, whereas this issue fundamentally isn’t.

After I used ESS with Emacs starting many years ago, I haven't opened RStudio. I know RStudio is very very nice, and ESS is a very complete option too.

Re: Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

#35
post #8

Working in RMarkdown it is super-easy to generate a publishable document from your research. Whereas there is still no good Jupyter—>PDF solution.

In theory, because you can access LaTeX features from an R Notebook, you could even write an entire manuscript with it, although I don't know if anyone has.

Re: Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

#36

Earlier quoted context omitted.

One where it was not necessary to specially create a ‘tidy’ version of everything to escape the horrific mess that exists by default

It would help if you said explicitly what language you think is better in this respect. Having Data Frames in Python at all requires importing Pandas afaik, so criticizing R for requiring an extra data-manipulation package wouldn't make sense from a Python perspective.

The point is not that you have to import a package, but whether by default package layouts and interop make sense. Notably, python scientific libraries build on a set of common foundations and apis (numpy, pandas etc). Additions to the ecosystem aim to build on familiar apis irrespective of implementation details (e.g dask). Python’s heavy use of namespaces makes organising a working environment simple, while it’s focus on consistent style and naming conventions means that code from different sources will look familiar. R meanwhile uses a global namespace (with at least two ways of loading libraries into it) so requiring more than a few extra libraries risks name collisions. Thus the need to create another ‘tidy’ library to fix a fundamental limitation of the language.

Re: Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

#37
post #5

RE python in Rmarkdown being limited... > The Python session ends after the cell executes, making it unhelpful for tasks other than ad hoc scripts. This isn't the case anymore thanks to the reticulate library. https://blog.rstudio.com/2018/03/26/reticulate-r-interface-t...

Is there an equivalent library for Julia?

Re: Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

#38
post #5

RE python in Rmarkdown being limited... > The Python session ends after the cell executes, making it unhelpful for tasks other than ad hoc scripts. This isn't the case anymore thanks to the reticulate library. https://blog.rstudio.com/2018/03/26/reticulate-r-interface-t...

Reticulate was a major improvement in the data science workflow. We now have full interoperability between R, Python, and Julia (or Scala if you're on Spark). The ability to mix languages is really valuable.

What would be the equivalent package for Julia?

Re: Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

#39
post #26

The article claims that > R Notebooks can only be created and edited in RStudio Luckily, this is wrong . Since R Notebooks are simply R Markdown, they can be edited with any editor (although the integration is obviously lost). This is, in fact, one of its decisive advantages over Jupyter Notebooks: most of the other issues mentioned in the article are solvable, whereas this issue fundamentally isn’t.

OP here:

Fair counterpoint, although when I wrote that I was more referring to the HTML knitting (via knitr). Also, there's a few very-new VS Code plugins for R Markdown which look very very interesting. (https://marketplace.visualstudio.com/items?itemName=neuron.n...)

Re: Advantages of Using R Notebooks Instead of Jupyter Notebooks (2017)

#40
post #38

Earlier quoted context omitted.

Reticulate was a major improvement in the data science workflow. We now have full interoperability between R, Python, and Julia (or Scala if you're on Spark). The ability to mix languages is really valuable.

What would be the equivalent package for Julia?

Weave.jl
Post reply on HN