R Markdown provides a unified interface for writing, collaborating, and communicating data analysis, data science, and results, making it easier to keep track of all your code, results, plots, and writing. This is especially useful for producing documents for audiences that are only interested in the results of your analysis, not the code.
install.packages("rmarkdown")
library(rmarkdown)
File -> New File -> R Markdown…
Then choose the title and output format.
• YAML Header: Controls some output settings that apply to the final document. • Code Chunk: Includes code to run, and code-related options. • Body Text: For communicating results and findings to the targeted audience. • Code to Generate a Table: Outputs a table with minimal formatting like you would see in the console. • Headers: Specified with ##. • Code to Generate a Plot: Outputs a plot
For Italic use: *
italic
For Bold text use: **
Bold
For underlined text use: {.underline}
underline
Section Headers:
“#” inside a code chunk acts as a normal R comment
Item 2a
Item 2b
Item 3a
Item 3
# Chunk Options