Chapter 3 Rmd
R Markdown is a powerful tool for combining analysis and reporting into the same document. R Markdown has grown substantially from a package that supports a few output formats, to an extensive and diverse ecosystem that supports the creation of books, blogs, scientific articles, websites, and even resumes.
Nice documentations
rmarkdown
package CRANbookdown
package CRAN- R markdown: The definitive guide. provides detailed references; GitHub repo HERE.
- R markdown cookbook: concise and covers essential functions, with examples.
- Authoring Books with R Markdown: with a focus on
bookdown
.
Q: What is the difference between Rmd and R script?
A:
- An R script (
.R
) is used for developing and troubleshooting code; a place where you can store reusable code fragments. - An R Markdown file (
.Rmd
) is used to integrate R commands with explanatory text and output, making it useful for creating reports.
Quick takeaways:
- Can still use horizontal separator
ctrl + shift + S
for dashed lines andctrl + shift + =
for equals - Headers must have one empty line above and below to separate it from other text