What is the difference between Pluto.jl and Jupyter Notebooks?
How do I decide which I should prefer for teaching students?
Is there a performance difference?
I only found https://www.reddit.com/r/Julia/comments/kxdjzh/pluto_vs_jupyter_notebook/, which does not include many details.
From Pluto.jl github page:
A Pluto notebook is made up of small blocks of Julia code (cells) and together they form a reactive notebook. When you change a variable, Pluto automatically re-runs the cells that refer to it. ...
The main difference between using Pluto.jl and Jupyter Notebooks with Julia is that Pluto.jl is dynamic. It re-runs all the above cells according to the last cell. Whereas outputs of Jupyter Notebook only change when the code blocks that created them change
I find the largest pro of Pluto to be, that by design notebooks the same resuts. In Jupyter it is quite easy to create results that are dependent on the cell-execution order, which is hard to do in Pluto.
In jupyter you can chose to execute cells one-by-one, which can be beneficial, if you have large calculations going. This can not be done in Pluto, but one learns to take this into consideration, when writing notebooks.
Support for slides is very good for Jupyter. For Pluto only proof of concepts exist as far as I am aware.
Both are performant.
For teaching students I personally prefer Pluto. Some of the restrictions imposed make it much simpler to debug these notebooks (results do not depend on cell execution order). Also the notebook is basically a standard Julia source code file, which can be manipulated easily using any text editor. Pluto's Reactivity is also great in an educational setting, as it encourages students to play around with the notebooks. Lastly, there is the MIT course Introduction to Computational Thinking, which uses these notebooks for lectures and exercises and they are a great inspiration on how to use Pluto notebooks for teaching. I hope these insights are what you were looking for.
Related
I'm not sure if this is a CV question or SO, so I apologize if it falls within the CV domain.
Problem
I know it's possible to microbenchmark specific chunks of R code, but is there any benchmark-ing tool for an entire Jupyter Notebook? I could just run the entire notebook and time it manually, but I'd like more statistics and precision on the timing for which the microbenchmark package provides (I'm trying to make a case for automation of data analyses and visualizations).
The other dilemma (an overall issue with notebooks) is that my notebook is divided into many individual cells, so the option of benchmark-ing in the Jupyter environment might be inefficient (forcing me to export all code and then running a microbenchmark on it say in R Studio).
Desired Solution
An efficient way to benchmark an entire, multi-celled JupyterLab Notebook.
We are confused on the difference between R and R studio. We do the majority of our work on R studio but we were required to download R as well. Is regular R necessary for R studio to work?
Indeed, R is the real technology you are using. RStudio is an IDE which makes it easier and nicer. Still, it's just working on top of R.
You should be comparing RStudio to a regular text editor. You can use R without RStudio, you might for instance use a text editor plus a terminal window.
As mentioned by #NewUser Rstudio is simply an IDE, and other alternatives do exist. Check the answer to another question here for a long list of alternatives.
Rstudio is however the most popular IDE, and it comes with quite a few benefits. Auto completion of code, the interactive window for html applications, interactive graphics window, easy connection to various databases with automatic connection string complection etc. However some prefer to use alternative IDE's and you could even set up notebook++ to write and execute your code through the terminal.
The most obvious alternative is likely the R IDE. The minimalistic IDE that comes with the installation has some benefits as well, while being restrictive in others. The most obvious benefit is the far lower usage of memory for each window. My thesis supervisor is a hard-lover of the standard IDE, while a friend of mine simply uses it in cases where he needs to View(...) very large data, and for some reasons can't live with a summary output.
That said this question basically has nothing to do with programming, and is technically considered "off-topic" on stackoverflow as it is asking for recommendations. Other websites in the SO family are simply better for these type of questions.
R studio can be considered as a "skin" over base R, which makes it more user friendly. However, base R can certainly be used without R studio.
The main difference you will experience at a beginner level is that you will need to use functions such as View(), rather than cntrl clicking a dataframe etc.
I'm using R (3.x) within Jupyter to perform some statistical analysis of a clinical study.
The flow of subjects is pretty complex and I would like to draw the Patient flow chart directly in my notebook. Like this one :
Why ?
To make sure the subjects count is consistent with the code, and not having to maintain sync between the R code and this figure.
I've tried DiagrammeR (won't install for some reason), RGrahpviz (too complex and doesn't meet the requirements).
A perfect solution might come from mermaid but I couldn't find a way to have it integrated with my Jupyter/R notebooks.
I'm not using a python Jupyter notebook but a R notebook.
You have mentioned that DiagrammeR won't install, but I would still provide one solution using DiagrammeR anyway--in case you have solved the installation issue. Suppose after you have made the graph using DimagrammeR and obtained a grViz object named myGraph. To display it under jupyter notebook, I use the following
require('DiagrammeR')
require('DiagrammeRsvg') #export grViz objects to svg
require('IRdisplay')
mySVG<-export_svg(myGraph)
display_svg(data=mySVG)
I am preparing a presentation on data analysis and I am provided with a 2-3 monitor and projector head-up. I would like to use one monitor(+projector) for code, one monitor(+projector) for console display and one monitor(+projector) for plots. Monitors are for me, projectors for the audience.
I would also like to run the code line-by-line (similar to the Ctr-Enter feature of RStudio); copy pasting code won't work. I want to use interactive graphics, analysis and plotting on-the-fly so any pre-done analysis won't work.
Is there any way to achieve this? Although Rstudio is a fantastic tool, a rather basic (and one might say easy) feature like panel detachment is not being developed although frequently requested. This would be probably the best solution to what I want.
UPDATE: Any OS (Win, Mac, Linux) will do.
You should be able to use the vanilla R GUI. Within that you have separate panels/windows for code, console, and plots (with as many plot windows as you want by calling a new device like quartz()). You can evaluate a line of code from the script using Cmd-Enter(mac) and Cntr-Enter (pc) plus the default settings highlight the line of interest. You could also use emacs in the same way, which I find much more powerful and fun.
This question already has answers here:
Closed 13 years ago.
Possible Duplicates:
Best IDE / TextEditor for R
Recommendations for Windows text editor for R
Dear All,
I teach a large introductory R course (about 100 students), and would like to recommend suitable text editors for R. The students who attend this course are first year mathematics undergraduates doing their very first course in R. They have never programmed in any language before.
For the vast majority of them, it wouldn't beneficial for them to learn to use a 'complex editor' - by this I mean emacs and vi.
What I would like to do is recommend simple text editors that are
free
can be easily installed on their laptops by users with little computer knowledge
have R syntax highlighting.
available for Windows or Mac.
For windows I've found:
TINN-R
Notepad ++ with the R plugin
Are there any others that I've missed for Windows?
There are a few threads that deal with R text editors:
Best IDE / TextEditor for R
Recommendations for Windows text editor for R
Which IDE for R in Linux?
but these are a bit too complicated for my purpose.
Edits
Following comments from Shane and others I've reworded the question.
Given that you don't have an major specific requirements (like an object browser), it's probably best to use what you're already using as much as possible. Something like Textpad is very simple and can do syntax highlighting.
Here are a few more pointers:
First of all, the R console that ships with Windows has it's own script editor. Just go File > New Script. It's very easy to use and you can execute code by highlighting it. If you just want something simple, I would stick with that.
I use Eclipse (with StatET) on Windows, and I have used it on a Mac too. It's great if you want an extensive IDE (syntax highlighting, integrated console, SVN, etc.) with a small learning curve.
JGR is also very good and platform independent.
Sciviews (which has Tinn-R) has several other options, including SciViews-K which is an R extension for Komodo.
Two others worth mentioning are Rattle and Rkward.
Emacs and VIM have a bigger learning curve, but they're also very powerful, especially if you're already using them for something else.
I see, this question is distinguished from prior ones by asking for a recommendation specific to "Intro to R" students. For the Mac portion of your question, i would suggest TextMate, for two reasons. First, the default answer "just use the Aqua R.app Gui" that R ships with, has minimal syntax highlighting and doesn't allow you to save and insert R commands (not that i'm aware of at least). Both of those things make learning a new language less painful and more efficient. But that might not justify the overhead of learning an editor while learning a new language at the same time.
No doubt others here will recommend TM, but they might not mention TextMate's tiered learning curve, i.e., someone who has never seen TM before can, after a 45-min tutorial, launch an interactive R session from it and use it to save/retrieve R commands "snippets". TM is not free, but it's around $50 with academic discount i believe. I would recommend three bundles for R use in TM, (i) R.app; (ii) R.daemon; and (iii) R, all of which are in the TM svn repository.
As always, emacs is an option: R in Emacs
This may not be the best option because of the learning curve with emacs though.
I haven't used it for R but TextMate on the Mac is awesome and they have an R bundle.
I haven't used it myself, but there is an Eclipse plug-in for R (which should work on Windows and Mac).
Because someone already mentioned Emacs, of course there's VIM with R plugin, don't know how many of those there are, but I found at least one with a quick google. VIM might have an even steeper learning curve than Emacs though.
That said. I think Emacs and VIM will both handle pretty much any language out there, so let the flame war begin!
I use Vim myself but I'm quite certain that both Vim and Emacs would be a bad choice for a student course.