[R] RMarkdown vignettes v. Jupyter notebooks?
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Thu Oct 11 16:03:10 CEST 2018
Ista, you do not seem to be aware of the
.nb.html format, which is way easier to share with a non-uswr than an ipynb file yet allows the same in-progress kinds of results to be shared and the source can be extracted easily using a web browser (no server needed).
There is some controversy about this whole notebook approach  but I think deciding whether it is right for your purposes is highly subjective.
FWIW It took me years to figure out how to even open a Jupyter notebook, so the idea that they should be the gold standard for sharing results seems absurd to me.
On October 11, 2018 5:53:29 AM PDT, Ista Zahn <istazahn using gmail.com> wrote:
>On Thu, Oct 11, 2018 at 8:36 AM Duncan Murdoch
><murdoch.duncan using gmail.com> wrote:
>> On 11/10/2018 7:18 AM, Ista Zahn wrote:
>> > Hi Spencer,
>> > On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves
>> > <spencer.graves using effectivedefense.org> wrote:
>> >> Hello:
>> >> What are the differences between Jupyter notebooks and
>> >> vignettes?
>> > Here are some of the main differences I'm aware of:
>> > Rmarkdown files include code and prose. The results produced by the
>> > code do not appear in the Rmarkdown file; instead, the file must be
>> > processed and typeset to produce a .pdf or .html (etc.) file that
>> > includes those results. Jupyter notebooks dispense with with
>> > processing step: output is displayed directly in the notebook. That
>> > is, a notebook includes code, prose, and results, while an
>> > file includes only code and prose.
>> RStudio can display the output mixed in with the text in the editor.
>True, but the _file_ does not include the output. Thus it functions
>more as a preview, and will not be visible to you if I email you a
>.Rmd file. On the other hand, .ipynb files really do contain the
>output; if I email one to you and you open it in Jupyter you will see
>the output as well.
>> > Rmarkdown allows control over the inclusion of code and results,
>> > over how the results are displayed via header arguments. There is
>> > such thing in Jupyter notebooks. Controlling the precise appearance
>> > a document produced by Jupyter is much more difficult. Going
>> > one can even say that Jupyter notebooks are designed primarily to
>> > read as Jupyter notebooks; exporting to other formats is kind of an
>> > afterthought. In contrast, Rmarkdown is designed to produce the
>> > readable result in another format (.html or .pdf typically).
>> > Rmarkdown is based on markdown, a human readable markup language,
>> > Jupyter notebooks are based on JSON, a data interchange format
>> > on the web. This means that Rmarkdown files can be easily edited
>> > any text editor you like. The same is not true of Jupyter
>> > While you can of course edit the JSON directly, the format is
>> > to be written and read by a computer; editing it yourself is not
>> > Rmarkdown is specific to R (I guess there is some basic support in
>> > knitr for other languages, but in my experience it never worked
>> > while Jupyter notebooks are language agnostic and "kernels" exist
>> > a large number of programming languages. However, each Jupyter
>> > notebook can use only one kernel; you can't easily have R and
>> > code in the same notebook.
>> > Jupyter notebooks typically run in your browser where the actual
>> > editing features are somewhat limited. Rmarkdown is typically run
>> > an editor such as Emacs or Rstudio where editing and project
>> > is much better and greater customization may be possible. You can
>> > indirectly with Jupyter notebooks in Emacs
>> > (https://github.com/millejoh/emacs-ipython-notebook) and perhaps
>> > editors as well; this goes some way toward escaping the tyranny of
>> > browser but is more fragile and difficult to get working compared
>> > Rmarkdown.
>> > Because Jupyter uses a web-based client-server model, it is easy to
>> > provide live interactive notebooks on your website (see e.g.,
>> > https://github.com/jupyterhub/binderhub). As far as I know this is
>> > currently possible with Rmarkdown.
>> There are ways to put Shiny apps into Rmarkdown documents; see
>> Other than my two notes above, your comments about Rmarkdown seem
>> right on the mark.
>> Duncan Murdoch
>> >> I'm trying to do real time monitoring of the broadcast
>> >> a radio station, and it seems to me that it may be easier to do
>> >> Python than in R. This led me to a recent post to
>> >> "python-list using python.org" that mentioned "Jupyter, Mathematica, and
>> >> Future of the Research Paper" by Paul Romer, who won the 2018
>> >> Memorial Prize in Economics only a few days ago. In brief, this
>> >> suggests that Jupyter notebooks may replace publication in
>> >> scientific journals as the primary vehicle for sharing scientific
>> >> research, because they make it so easy for readers to follow both
>> >> scientific and computational logic and test their own
>> >> A "Jupyter Notebook Tutorial: The Definitive Guide"
>> >> I first install Anaconda Navigator. I got version 1.9.2 of that.
>> >> opens with options for eight different "applications" including
>> >> JupyterLab 0.34.9, Jupyter Notebook 5.6.0, Spyder 3.3.1 (an IDE
>> >> Python), and RStudio 1.1.456.
>> >> This leads to several questions:
>> >> 1. In general, what experiences have people had
>> >> Jupyter Notebooks, Anaconda Navigator, and RMarkdown vignettes in
>> >> RStudio, and the similarities and differences? Do you know any
>> >> references that discuss this?
>> > I've used both extensively, and noted the differences I've
>> >> 2. More specifically, does it make sense to try to
>> >> RStudio from within Anaconda Navigator, or is one better off using
>> >> RStudio as a separate, stand alone application -- or should one
>> >> abandon RStudio and run R instead from within a Jupyter Notebook?
>> >> new to this topic, so it's possible that this question doesn't
>> >> sense.]
>> > The only advantage I can think of to using Rstudio via Anaconda is
>> > that you could use conda environments to maintain different
>> > or R and/or R packages for different projects.
>> > You'll have to weigh the pros and cons to decide whether to switch
>> > from Rstudio to Jupyter notebooks. Depending on what you want to do
>> > there are both advantages and disadvantages, as discussed above.
>> > Finally, I have to give a plug for a couple of related tools that I
>> > find very useful.
>> > Emacs org-mode https://orgmode.org/ gives you the best of both
>> > notebooks unconstrained by the browser that can include code in
>> > multiple languages, header arguments, excellent export support,
>> > It is superior to both Jupyter and Rmarkdown, except that support
>> > exists in Emacs.
>> > Jupytext (https://github.com/mwouts/jupytext) is another way to
>> > it all, by allowing you to edit in markdown or Rmarkdown, and
>> > auto-generating a notebook and possibly other formats for you. I've
>> > only recently started experimenting with it, but so far I like it a
>> > lot.
>> > Best,
>> > Ista
>> >> Thanks,
>> >> Spencer Graves
>> >>  If you have ideas for how best to do real time monitoring of
>> >> broadcast quality of a radio station, I'd love to hear them. I
>> >> software that will do that, preferably something that's free, open
>> >> source. The commercial software I've seen for this is not
>> >> my purposes, so I'm trying to write my own. I have a sample
>> >> Python that will read a live stream from a radio tuner and output
>> >> *.wav of whatever length I want, and I wrote Python eight years
>> >> a similar real time application. I'd prefer to use R, but I don't
>> >> how to get started.
>> >>  2018-04-13:
>> >> This further cites a similar article in The Atlantic from
>> >> ______________________________________________
>> >> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> >> https://stat.ethz.ch/mailman/listinfo/r-help
>> >> PLEASE do read the posting guide
>> >> and provide commented, minimal, self-contained, reproducible code.
>> > ______________________________________________
>> > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> > and provide commented, minimal, self-contained, reproducible code.
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.
Sent from my phone. Please excuse my brevity.
More information about the R-help