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

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 and ctrl + shift + = for equals
  • Headers must have one empty line above and below to separate it from other text