![]() ![]() that is sad! I was teaching R Markdown the other day with a github repository full of. Later I emailed her and she told me her students were often confused, too: In short, between a nice view and the correct Rmd source, you could only choose one. Then she indented the whole content of the Rmd file by four spaces, which would make it easier for people to see the Rmd source from the normal Github view, but the Rmd source was essentially wrong. ![]() Then it seemed she was not happy with the raw link, because it pointed to a plain text page. One day I saw an instructor posted an Rmd example on Github, and tweeted about it with the Github raw link to the Rmd file. There have been people who struggled with trying to show other people the verbatim source Rmd file. Then you go to the Github repo, open the *.Rmd source file, and you cannot see the full source code in the default normal view. For example, when you see a nice R Markdown output page somewhere, and you may want to know how it was generated. In particular, the code chunk headers are lost, and the chunk headers can be critical for the purpose of learning. Rendering *.Rmd as *.md on Github loses critical information, which can be highly confusing. If it needs to be rendered (to HTML), it has to be rendered in the way that it is supposed to be rendered (via the R package rmarkdown). The bottom line is that the source is the source. R Markdown is a source format, which looks like Markdown, but it is not equivalent to Markdown. There are two drawbacks of rendering Rmd as Markdown on Github. The question is whether the disadvantages outweigh the advantage, and obviously I do think so. Rendering Rmd as Markdown has the one and only advantage: it makes the text of Rmd files more human-readable, because reading a rendered output file (an HTML page) is more pleasant than reading the (Rmd) source file. ![]() There are rarely things that are absolutely good or bad. Since then, I have found it more bothersome than convenient, and eventually thought it was a mistake. I guess some users are going to hate me for this, so I want to explain the rationale in this post.įour years ago, a couple of R users, including Karthik, requested Github to add this feature. Recently I requested Github to undo the feature of treating R Markdown as Markdown on Github, i.e., rendering R Markdown as if it were plain Markdown when you browse such files in a Github repo. Rmd Files will No Longer be Rendered as Markdown on Github Yihui Xie / Rmd Files will No Longer be Rendered as Markdown on Github - Yihui Xie | 谢益辉 ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |