News for hackers. Stuff that matters.
Re:How to Version-Control Jupyter Notebooks by pavanagrawal123 on Saturday December 22, 2018 @04:40PM (#18742597)
I have never programmed in R before, but why do you say that there is no need for cells?

I use cells/notebooks in Python, so I can keep my code organized and run computationally intensive things once... Is this something that is not needed in R?

Re:How to Version-Control Jupyter Notebooks by altairiumblue on Saturday December 22, 2018 @05:07PM (#18742740)
So firstly, you can use R in Jupyter in the exact same way you use Python (ju-pyt-er stands for Julia, Python, R).

Then R also had RMarkdown which allows to have notebooks with executable cells (code chunks) and they play much nicer with version control than .ipynb files.

What I was referring to in my previous post is working with a .R file (which is plain text) in RStudio. If my cursor is on a single line which is also one statement, ctrl/cmd + enter executes that statement and shows me the output in the console or in a separate pane for plots. If the cursor is within a multi-line expression such as a plot declaration, beginning of a loop, function declaration, then the interpreter figures out that I want to run multiple lines and executes the whole loop/declares function/creates plot. Or I can also select some code and run it.

Ideally, this is the kind of behaviour that I'd like to replicate with a .py file. It's a nice interactive workflow and also solves the problems that jupyter has with version control.

Re:How to Version-Control Jupyter Notebooks by pavanagrawal123 on Saturday December 22, 2018 @05:33PM (#18742870)
Interesting... I'm currently working on VSNotebooks (extension for VScode), which is a fork from Neuron... I would love to get some ideas that could help bring notebooks into the future, so thanks for your reply!
Re:How to Version-Control Jupyter Notebooks by imbiased on Saturday December 22, 2018 @07:07PM (#18743345)
Pweave seems to give the same as RMarkdown but for Python and other languages: https://github.com/mpastell/Pweave. Examples: http://mpastell.com/pweave/examples/index.html