R Markdown Flashcards
echo = FALSE
This means the code that generates a chart for example, will not show up.
How do I hide the code that generates a visual?
echo = FALSE
How do I insert an R code chunk?
by typing the chunk delimiters
{r} and
by typing the chunk delimiters
{r} and
I can insert a code chunk in R Markdown
include = FALSE
prevents code and results from appearing in the finished file. R Markdown still runs the code in the chunk, and the results can be used by other chunks.
prevents code and results from appearing in the finished file. R Markdown still runs the code in the chunk, and the results can be used by other chunks.
include = FALSE
echo = FALSE
prevents code, but not the results from appearing in the finished file. This is a useful way to embed figures.
prevents code, but not the results from appearing in the finished file. This is a useful way to embed figures.
echo = FALSE
message = FALSE
prevents messages that are generated by code from appearing in the finished file.
prevents messages that are generated by code from appearing in the finished file.
message = FALSE
warning = FALSE
prevents warnings that are generated by code from appearing in the finished
prevents warnings that are generated by code from appearing in the finished
warning = FALSE
fig.cap = “…”
adds a caption to graphical results.
adds a caption to graphical results.
fig.cap = “…”
knitr::opts_chunk$set
To set global options that apply to every chunk in your file, call
To set global options that apply to every chunk in your file, call
knitr::opts_chunk$set
Code results can be inserted directly into the text of a .Rmd file by enclosing the code with
r
r
Code results can be inserted directly into the text of a .Rmd file by enclosing the code with
R Markdown will always
display the results of inline code, but not the code
apply relevant text formatting to the results
knitr::kable
If you prefer that data be displayed with additional formatting you can use
If you prefer that data be displayed with additional formatting you can use
knitr::kable
results=’asis’
chunk option. This is required to ensure that the raw table output isn’t processed further by knitr.
chunk option. This is required to ensure that the raw table output isn’t processed further by knitr.
results=’asis’
a set of markup annotations for plain text files. When you render your file, Pandoc transforms the marked up text into formatted text in your final file format
Pandoc
Pandoc
a set of markup annotations for plain text files. When you render your file, Pandoc transforms the marked up text into formatted text in your final file format
You can use Pandoc’s Markdown to make:
Headers Lists Links Images Block quotes Latex equations Horizontal rules Tables Footnotes Bibliographies and Citations Slide breaks Italicized text Bold text Superscripts Subscripts Strikethrough text