Lesson 6 R Markdown
6 Learning Objectives
- Understand why literate programming is useful
- Create and edit an RMarkdown file
- Know how to manipulate some common chunk options
R Markdown is a special file format which allows us to combine text, code, and the output of that code in a single file. This combination of explanation, code, and results is called literate programming and is a powerful way to share research and data explorations.
RMarkdown is an extended version of the Markdown (.md
) file format, which is an easy way to make nicely formatted text documents without endlessly tinkering with the formatting (as you might with LaTeX). The software community loves Markdown because in addition to being straightforward, it has good support for formatting code, which can be a pain in other formats.
RMarkdown takes this a step further by allowing you to run the code in your document, and having the output appear below the code that made it.
If you’ve used ipython/Jupyter notebooks before, R Markdown will feel similar. All the lessons in this workshop were created with R Markdown!