4 ms·
First of all, this is for statistics based papers, not just "technical papers". The "R" in the URL and also in the language itself shows that focus. So if you h
by Noseshine 10y ago
First of all, this is for statistics based papers, not just "technical papers". The "R" in the URL and also in the language itself shows that focus. So if you have to first download R (and RStudio) you may not be the target audience.
The benefit of RMarkdown publications is that they contain the code to reproduce every single step in the argument - as far as it is based on data.
Examples from me, made for a course on Coursera some time ago (so especially in the 2nd example the focus wasn't on the result, effort for data cleaning was deliberately kept to a minimum):
- https://rpubs.com/Noseshine/74191 https://rpubs.com/Noseshine/74191
- https://rpubs.com/Noseshine/79343 https://rpubs.com/Noseshine/79343
Every single line of code necessary to produce the graphs and tables and summary statistics is in there. If you get the source RMarkdown file you can run it yourself. The graphics and tables are not images created somewhere else!
Usually you will have the code in an appendix at the very end, but every single thing in the document based on data is calculated using code somewhere in the document itself.
The main target for these kinds of publications are statistics-heavy papers. Usually you just read the conclusions of the authors and some summary statistics but you don't have access a) to the data they used and b) to the methods they used on the data. RMarkdown documents provide b) and (hopefully) an embedded link to a) (in the form of source code that when executed downloads it into your R environment).
The background story is that not infrequently you find studies (in all kinds of statistics-heavy fields from medicine to psychology) where the summary conclusions are based on faulty premises, faulty data collection/selection, faulty statistical methods. If all you have is a LaTeX or Word or whatever (passive) summary document you cannot find any of those problems unless you keep bugging the authors for a copy of their data and their code used to analyse it, which is a lot of work and was too often altogether unsuccessful. So there is a push in science to get people and organizations to publish more than just the summary.
Another advantage: You can produce interactive (online) versions, for example showing a graph where you can change parameters interactively, but show a few static example graphs in the static document version.
As for just the format:
The reason to compete with LaTeX has been given right here on HN a few times when LaTeX was discussed: It is far more difficult and has plenty of bugs and difficulties. A long time ago I wrote my thesis in it and had no major issues, but I don't know why I would want to write anything in it now. Things like RMarkdown are much less flexible - and orders of magnitude easier, both to write and to debug.
As for the competition with Word, text-based formats have the advantage to be easily "processable" using other tools.
- yihui 10y ago> First of all, this is for statistics based papers, not just "technical papers". The blog post is not really long, and in the fourth paragraph, I wrote: > [...] We used books and R primarily for examples in this book, but bookdown is not only for books or R. Most features introduced in this book also apply to other types of publications: journal papers, reports, dissertations, course handouts, study notes, and even novels. You do not have to use R, either. Other choices of computing languages include Python, C, C++, SQL, Bash, Stan, JavaScript, and so on, although R is best supported. You can also leave out computing, for example, to write a novel. Perhaps one thing I didn't make clear enough is that (you are right that) R (optionally RStudio) should be downloaded to use bookdown locally, but your document or book does not have to be related to R or statistics at all. However, I do agree that people who don't use R probably won't care about downloading R in the first place to use bookdown, so even if bookdown is sort of "general-purpose", the actual major audience is likely to be those doing statistics and data analysis using R. That said, Sections 5.5 and 6.2 of the bookdown book have shown how to use bookdown on Github and Travis CI: https://bookdown.org/yihui/bookdown/ https://bookdown.org/yihui/bookdown/ That way, you don't have to install R locally. All you need to do is to commit changes to Github, and the book can be built automatically on Travis and published to Github pages. The author has to find someone to help him/her set up these services, though.