diff --git a/_freeze/html/rmarkdown/execute-results/html.json b/_freeze/html/rmarkdown/execute-results/html.json index 5d2b6095..4fb62925 100644 --- a/_freeze/html/rmarkdown/execute-results/html.json +++ b/_freeze/html/rmarkdown/execute-results/html.json @@ -1,7 +1,8 @@ { - "hash": "efa917bee079774d68ae1e17f2b3ffd1", + "hash": "ae9817d52859f3b6e25ed5c741006f27", "result": { - "markdown": "---\ntitle: \"rmarkdown :: Cheatsheet\"\ndescription: \" \"\nimage-alt: \"\"\nexecute:\n eval: true\n output: false\n warning: false\n---\n\n::: {.cell .column-margin}\n\"Hex\n

\n

Download PDF

\n\"\"/\n
\n

Translations (PDF)

\n* Dutch\n* German\n* Italian\n* Japanese\n* Korean\n* Spanish\n* Turkish\n* Vietnamese\n:::\n\n\n## What is rmarkdown?\n\n- **.Rmd files:** Develop your code and ideas side-by-side in a single document. Run code as individual chunks or as an entire document.\n- **Dynamic Documents:** Knit together plots, tables, and results with narrative text. Render to a variety of formats like HTML, PDF, MS Word, or MS PowerPoint.\n- **Reproducible Research:** Upload, link to, or attach your report to share. Anyone can read or run your code to reproduce your work.\n\n## Workflow\n\n1. Open a **new .Rmd file** in the RStudio IDE by going to *File \\> New File \\> R Markdown*.\n\n2. **Embed code** in chunks.\n Run code by line, by chunk, or all at once.\n\n3. **Write text** and add tables, figures, images, and citations.\n Format with Markdown syntax or the RStudio Visual Markdown Editor.\n\n4. **Set output format(s) and options** in the YAML header.\n Customize themes or add parameters to execute or add interactivity with Shiny.\n\n5. **Save and render** the whole document.\n Knit periodically to preview your work as you write.\n\n6. **Share your work!**\n\n### Source Editor\n\n![](images/source-editor.png){fig-align=\"center\"}\n\n::: {.callout-note appearance=\"minimal\" icon=\"false\" collapse=\"true\"}\n## Expand to read about the features in the Source Editor {aria-hidden=\"true\"}\n\n### Features within the Source Editor\n\n1. New File\n2. Embed Code\n3. Write Text\n4. Set Output Format(s) and Options\n5. Save and Render\n6. Share\n\n- Set preview location\n- Insert code chunk\n- Go to code chunk\n- Run code chunk(s)\n- Show outline\n- Modify chunk options\n- Run all previous chunks\n- Run current chunk\n- Switch to visual editor\n:::\n\n### Visual Editor\n\n![](images/rmd-visual-editor.png){fig-align=\"center\"}\n\n::: {.callout-note appearance=\"minimal\" icon=\"false\" collapse=\"true\"}\n## Expand to read about the features in the Visual Editor {aria-hidden=\"true\"}\n\n### Features within the Visual Editor\n\n- Insert citations\n- Style options\n- Add/edit attributes\n- Switch to source editor\n:::\n\n### Rendered Output\n\n![](images/rendered-output.png){fig-align=\"center\"}\n\n::: {.callout-note appearance=\"minimal\" icon=\"false\" collapse=\"true\"}\n## Expand to read about the features in the Rendered Output Window {aria-hidden=\"true\"}\n\n### Features within the Rendered Output Window\n\n- File path to output document\n- Find in document\n- Publish to rpubs.com, shinyapps.io, Posit Connect\n- Reload document\n:::\n\n## Embed Code With knitr\n\n### Code Chunks\n\nSurround code chunks with ```` ```{r} ```` and ```` ``` ```` or use the Insert Code Chunk button.\nAdd a chunk label and/or chunk options inside the curly braces after `r`.\n\n\n\n````default\n```{r chunk-label, include = FALSE}\n```\n\n````\n\n### Set Global Options\n\nSet options for the entire document in the first chunk.\n\n\n````default\n```{r include = FALSE}\nknitr::opts_chunk$set(message = FALSE)\n```\n````\n\n### Inline Code\n\nInsert `` `r ` `` into text sections.\nCode is evaluated at render and results appear as text.\n\nThe markdown text\n\n``` \nBuilt with `r getRversion()` \n```\n\nwill render as \"Built with 4.3.0\" in the output file.\n\n### Chunk Options\n\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| Option | Default | Effects |\n+==========================+=============+==============================================================================================================+\n| `echo` | `TRUE` | display code in output document |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `error` | `FALSE` | TRUE (display error messages in doc), FALSE (stop render when error occurs) |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `eval` | `TRUE` | run code in chunk |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `include` | `TRUE` | include chunk in doc after running |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `message` | `TRUE` | display code messages in document |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `warning` | `TRUE` | display code warnings in document |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `results` | `\"markup\"` | `\"asis\"` (pass through results), `\"hide\"` (don't display results), `\"hold\"` (put all results below all code) |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `fig.align` | `\"default\"` | `\"left\"`, `\"right\"`, or `\"center\"` |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `fig.alt` | `NULL` | alt text for a figure |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `fig.cap` | `NULL` | figure caption as a character string |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `fig.path` | `\"figure/\"` | prefix for generating file paths |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `fig.width & fig.height` | `7` | plot dimensions in inches |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `out.width` | | rescales output width, e.g. `\"75%\"`, `\"300px\"` |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `collapse` | `FALSE` | collapse all sources & output into a single block |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `comment` | `\"##\"` | prefix for each line of results |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `child` | `NULL` | file(s) to knit and then include |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n| `purl` | `TRUE` | include or exclude a code chunk when extracting source code with `knitr::purl()` |\n+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+\n\n: Table of chunk options. The first column is the option name, the second column is the option's default value, the third column describes what the option does.\n\nSee more options and defaults by running `str(knitr::opts_chunk$get())`.\n\n## Insert Citations\n\nCreate citations from a bibliography file, a Zotero library, or from DOI references.\n\n### Build Your Bibliography\n\n- Add BibTex or CSL bibliographies to the YAML header.\n\n ``` yaml\n ---\n title: \"My Document\"\n bibliography: references.bib\n link-citations: TRUE\n ---\n ```\n\n- If Zotero is installed locally, your main library will automatically be available.\n\n- Add citations by DOI by searching \"from DOI\" in the **Insert Citation** dialog.\n\n### Insert Citations\n\n- Access the **Insert Citations** dialog in the Visual Editor by clicking the **\\@** symbol in the toolbar or by clicking **Insert \\> Citation.**\n- Add citations with markdown syntax by typing `[@cite]` or `@cite`.\n\n## Insert Tables\n\nOutput data frames as tables using `kable(data, caption)`.\n\n\n\n````default\n```{r}\ndata <- faithful[1:4,]\nknitr::kable(data, caption = \"Tables with kable\")\n```\n\n````\n\nOther table packages include **flextable**, **gt**, and **kableExtra**.\n\n## Write With Markdown\n\nThe syntax on the left renders as the output on the right.\n\n+---------------------------------------------+--------------------------------------------------------------------------+\n| # Markdown Syntax | # Rendered Output |\n| | |\n| ``` | Plain text. |\n| Plain text. | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | End a line with two spaces to |\n| End a line with two spaces to | |\n| start a new paragraph. | start a new paragraph. |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | Also end a line with a backslash |\n| Also end a line with a backslash\\ | |\n| to make a new line. | to make a new line. |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | *italics* and **bold** |\n| *italics* and **bold** | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | superscript^2^ /subscript~2~ |\n| superscript^2^/subscript~2~ | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ~~strike through~~ |\n| ~~strike through~~ | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | escaped: \\* \\_ \\\\ |\n| escaped: \\* \\_ \\\\ | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | en dash: --, em dash: --- |\n| en dash: --, em dash: --- | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | # Header 1 |\n| # Header 1 | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ## Header 2 |\n| ## Header 2 | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ... |\n| ... | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ###### Header 6 |\n| ###### Header 6 | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | - unordered list |\n| - unordered list | |\n| - item 2 | - item 2 |\n| - item 2a (indent 1 tab) | |\n| - item 2b | - item 2a (indent 1 tab) |\n| ``` | |\n| | - item 2b |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | 1. ordered list |\n| 1. ordered list | |\n| 2. item 2 | 2. item 2 |\n| - item 2a (indent 1 tab) | |\n| - item 2b | - item 2a |\n| ``` | |\n| | - item 2b |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | |\n| | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | [This is a link.](https://posit.co/) |\n| [This is a link.](link url) | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | [This is another link.](https://posit.co/) |\n| [This is another link.][id]. | |\n| | |\n| At the end of the document: | |\n| [id]: link url | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ![R Markdown logo](images/rmarkdown-logo.png){width=\"300\"} |\n| ![Caption](image.png) | |\n| | |\n| or | |\n| | |\n| ![Caption](id2) | |\n| | |\n| At the end of the document include: | |\n| [id2]: image.png | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | `verbatim code` |\n| `verbatim code` | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ```` | ``` |\n| ``` | multiple lines |\n| multiple lines | of verbatim code |\n| of verbatim code | ``` |\n| ``` | |\n| ```` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | > block quotes |\n| > block quotes | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | equation: $e^{i \\pi} + 1 = 0$ |\n| equation: $e^{i \\pi} + 1 = 0$ | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | equation block: |\n| equation block: | |\n| $$E = mc^{2}$$ | $$ |\n| ``` | E = mc^{2} |\n| | $$ |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | horizontal rule: |\n| horizontal rule: | |\n| --- | ------------------------------------------------------------------------ |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | | Right | Left | Default | Center | |\n| |Right|Left|Default|Center| | |------:|:-----|---------|:------:| |\n| |----:|:---|-------|:----:| | | 12 | 12 | 12 | 12 | |\n| |12 |12 |12 |12 | | | 123 | 123 | 123 | 123 | |\n| |123 |123 |123 |123 | | | 1 | 1 | 1 | 1 | |\n| |1 |1 |1 |1 | | |\n| | : Caption text, example rendered table. |\n| Table: Caption text, example rendered table | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| HTML Tabsets | ## Results |\n| | |\n| ``` | ::: panel-tabset |\n| ## Results {.tabset} | ## Plots |\n| ### Plots | |\n| text | text |\n| | |\n| ### Tables | ## Tables |\n| more text | |\n| ``` | more text |\n| | ::: |\n+---------------------------------------------+--------------------------------------------------------------------------+\n\n: Table of markdown syntax and rendered examples. The syntax in the first column renders to the output in the second column.\n\n\n\n## Set Output Formats and Their Options in YAML\n\nUse the document's YAML header to set an **output format** and customize it with **output options**.\nIndent format 2 characters, indent options 4 characters.\n\n``` yaml\n---\ntitle: \"My Document\"\nauthor: \"Author Name\"\noutput:\n html_document: \n toc: true\n toc-location: left\n---\n```\n\n### Output Format Table\n\n| Output Format | Creates |\n|---------------------------|------------------------------|\n| `html_document` | .html |\n| `pdf_document`[^1] | .pdf |\n| `word_document` | Microsoft Word (.docx) |\n| `powerpoint_presentation` | Microsoft PowerPoint (.pptx) |\n| `odt_document` | OpenDocument Text |\n| `rtf_document` | Rich Text Format |\n| `md_document` | Markdown |\n| `github_document` | Markdown for Github |\n| `ioslides_presentations` | ioslides HTML slides |\n| `slidy_presentation` | Slidy HTML slides |\n| `beamer_presentation`[^2] | Beamer slides |\n\n: Table of output formats. The output format in the first column creates the file type in the second column.\n\n[^1]: PDFs and Beamer slides require LaTeX, use `tinytex::install_tinytex()`.\n\n[^2]: PDFs and Beamer slides require LaTeX, use `tinytex::install_tinytex()`.\n\nAlso see **flexdashboard**, **bookdown**, **distill**, and **blogdown**.\n\n### Output Options Table\n\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| Important Options | Description | HTML | PDF | MS Word | MS PPT |\n+======================+========================================================================================+======+======+=========+========+\n| anchor_sections | Show section anchors on mouse hover (TRUE or FALSE) | X | | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| citation_package | The LaTeX package to process citations (\"default\", \"natbib\", biblatex\") | | | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| code_download | Give readers an option to download the .Rmd source code (TRUE or FALSE) | X | | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| code_folding | Let readers toggle the display of R code (\"none\", \"hide\", or \"show\") | X | | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| css | CSS or SCSS file to use to style the document (e.g. \"style.css\") | X | | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| dev | Graphics device to use for figure output (e.g. \"png\", \"pdf\") | X | X | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| df_print | Method for printing data frames (\"default\", \"kable\", \"tibble\", \"paged\") | X | X | X | X |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| fig_caption | Should figures be rendered with captions (TRUE or FALSE) | X | X | X | X |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| highlight | Syntax highlighting (\"tango\", \"pygments\", \"kate\", \"zenburn\", \"textmate\") | X | X | X | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| includes | File of content to place in doc (\"in_header\", \"before_body\", \"after_body\") | X | X | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| keep_md | Keep the Markdown .md file generated by knitting (TRUE or FALSE) | X | X | X | X |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| keep_tex | Keep the intermediate TEX file used to convert to PDF (TRUE or FALSE) | | X | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| latex_engine | LaTeX engine for producing PDF output (\"pdflatex\", \"xelatex\", or \"lualatex\") | | X | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| reference_docx/\\_doc | docx/pptx file containing styles to copy in the output (e.g. \"file.docx\", \"file.pptx\") | | | X | X |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| theme | Theme options (see Bootswatch and Custom Themes below) | X | | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| toc | Add a table of contents at start of document (TRUE or FALSE) | X | X | X | X |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| toc_depth | The lowest level of headings to add to table of contents (e.g. 2, 3) | X | X | X | X |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n| toc_float | Float the table of contents to the left of the main document content (TRUE or FALSE) | X | | | |\n+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+\n\n: Table of output options. The first column is the option name, the second column is the description and possible values, and then remaining columns show what file types each option can be applied to.\n\nUse `?` to see all of a format's options, e.g. `?html_document`\n\n## More Header Options\n\n### Parameters\n\nParameterize your documents to ruse with new inputs (e.g. data, values, etc.).\n\n1. **Add parameters** in the header as sub-values of `params`.\n\n ``` yaml\n ---\n params:\n state: \"hawaii\"\n ---\n ```\n\n2. **Call parameters** in code using `params$name`.\n\n \n ````default\n ```{r}\n data <- df[,params$state]\n summary(data)\n ```\n ````\n\n3. **Set parameters** with Knit with Parameters or the params argument of `render()`.\n\n### Reusable Templates\n\n1. **Create a new package** with an inst/rmarkdown/templates directory.\n\n2. **Add a folder** containing **template.yaml** (below) and **skeleton.Rmd** (template contents).\n\n ``` yaml\n ---\n name: \"My Template\"\n ---\n ```\n\n3. **Install** the package to access template by going to **File \\> New R Markdown \\> From Template**.\n\n### Bootswatch Themes\n\nCustomize HTML documents with Bootswatch themes from the **bslib** package using the theme output option.\nUse `bslib::bootswatch_themes()` to list available themes.\n\n``` yaml\n---\ntitle: \"My Document\"\nauthor: \"Author Name\"\noutput:\n html_document:\n theme:\n bootswatch: solar\n---\n```\n\n### Custom Themes\n\nCustomize individual HTML elements using bslib variables.\nUse `?bs_theme` to see more variables.\n\n``` yaml\n---\noutput:\n html_document:\n theme:\n bg: \"#121212\"\n fg: \"#E4E4E4\"\n base_font:\n google: \"Prompt\"\n---\n```\n\nMore on **bslib** at .\n\n### Styling With CSS and SCSS\n\nAdd CSS and SCSS to your documents by adding a path to a file with the **css** option in the YAML header.\n\n``` yaml\n---\ntitle: \"My Document\"\nauthor: \"Author Name\"\noutput:\n html_document:\n css: \"style.css\"\n---\n```\n\nApply CSS styling by writing HTML tags directly or:\n\n- Use markdown to apply style attributes inline.\n\n - Bracketed Span\\\n `A [green]{.my-color} word.` will render as \"A [green]{style=\"color: green\"} word.\"\n\n - Fenced Div\n\n ``` \n :::{.my-color}\n All of these words\n are green\n :::\n ```\n\n will render as\n\n ::: {style=\"color: green\"}\n All of these words\n\n are green.\n :::\n\n- Use the Visual Editor.\n Go to **Format \\> Div/Span** and add CSS styling directly with Edit Attributes.\n\n### Interactivity\n\nTurn your report into an interactive Shiny document in 4 steps:\n\n1. Add `runtime: shiny` to the YAML header.\n\n ``` yaml\n ---\n output: html_document\n runtime: shiny\n ---\n ```\n\n2. Call Shiny input functions to embed input objects.\n\n3. Call Shiny output functions to embed reactive output.\n\n \n ````default\n ```{r echo = FALSE}\n numericInput(\"n\", \"How many cars?\", 5)\n \n renderTable({\n head(cars, input$n)\n })\n ```\n ````\n\n4. Render with `rmarkdown::run()` or click **Run Document** in RStudio IDE.\n\nAlso see Shiny Prerendered for better performance.\n.\n\nEmbed a complete Shiny app into your document with `shiny::shinyAppDir()`.\nMore at .\n\n## Render\n\nWhen you render a document, rmarkdown:\n\n1. Runs the code and embeds results and text into an .md file with knitr.\n2. Converts the .md file into the output format with Pandoc.\n\n**Save,** then **Knit** to preview the document output.\nThe resulting HTML/PDF/MS Word/etc.\ndocument will be created and saved in the same directory as the .Rmd file.\n\nUse `rmarkdown::render()` to render/knit in the R console.\nSee `?render` for available options.\n\n## Share\n\n**Publish on Posit Connect** to share R Markdown documents securely, schedule automatic updates, and interact with parameters in real-time.\n.\n\n------------------------------------------------------------------------\n\nCC BY SA Posit Software, PBC • [info\\@posit.co](mailto:info@posit.co) • [posit.co](https://posit.co)\n\nLearn more at [rmarkdown.rstudio.com](https://rmarkdown.rstudio.com/).\n\nUpdated: 2023-07.\n\n::: {.cell}\n\n```{.r .cell-code}\npackageVersion(\"rmarkdown\")\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n[1] '2.23'\n```\n:::\n:::\n\n------------------------------------------------------------------------\n", + "engine": "knitr", + "markdown": "---\ntitle: \"rmarkdown :: Cheatsheet\"\ndescription: \" \"\nimage-alt: \"\"\nexecute:\n eval: true\n output: false\n warning: false\n---\n\n::: {.cell .column-margin}\n\"Hex\n

\n

Download PDF

\n\"\"/\n
\n

Translations (PDF)

\n* Dutch\n* German\n* Italian\n* Japanese\n* Korean\n* Spanish\n* Turkish\n* Vietnamese\n:::\n\n\n\n## What is rmarkdown?\n\n- **.Rmd files:** Develop your code and ideas side-by-side in a single document. Run code as individual chunks or as an entire document.\n- **Dynamic Documents:** Knit together plots, tables, and results with narrative text. Render to a variety of formats like HTML, PDF, MS Word, or MS PowerPoint.\n- **Reproducible Research:** Upload, link to, or attach your report to share. Anyone can read or run your code to reproduce your work.\n\n## Workflow\n\n1. Open a **new .Rmd file** in the RStudio IDE by going to *File \\> New File \\> R Markdown*.\n\n2. **Embed code** in chunks.\n Run code by line, by chunk, or all at once.\n\n3. **Write text** and add tables, figures, images, and citations.\n Format with Markdown syntax or the RStudio Visual Markdown Editor.\n\n4. **Set output format(s) and options** in the YAML header.\n Customize themes or add parameters to execute or add interactivity with Shiny.\n\n5. **Save and render** the whole document.\n Knit periodically to preview your work as you write.\n\n6. **Share your work!**\n\n### Source Editor\n\n![](images/source-editor.png){fig-align=\"center\"}\n\n::: {.callout-note appearance=\"minimal\" icon=\"false\" collapse=\"true\"}\n## Expand to read about the features in the Source Editor {aria-hidden=\"true\"}\n\n### Features within the Source Editor\n\n1. New File\n2. Embed Code\n3. Write Text\n4. Set Output Format(s) and Options\n5. Save and Render\n6. Share\n\n- Set preview location\n- Insert code chunk\n- Go to code chunk\n- Run code chunk(s)\n- Show outline\n- Modify chunk options\n- Run all previous chunks\n- Run current chunk\n- Switch to visual editor\n:::\n\n### Visual Editor\n\n![](images/rmd-visual-editor.png){fig-align=\"center\"}\n\n::: {.callout-note appearance=\"minimal\" icon=\"false\" collapse=\"true\"}\n## Expand to read about the features in the Visual Editor {aria-hidden=\"true\"}\n\n### Features within the Visual Editor\n\n- Insert citations\n- Style options\n- Add/edit attributes\n- Switch to source editor\n:::\n\n### Rendered Output\n\n![](images/rendered-output.png){fig-align=\"center\"}\n\n::: {.callout-note appearance=\"minimal\" icon=\"false\" collapse=\"true\"}\n## Expand to read about the features in the Rendered Output Window {aria-hidden=\"true\"}\n\n### Features within the Rendered Output Window\n\n- File path to output document\n- Find in document\n- Publish to rpubs.com, shinyapps.io, Posit Connect\n- Reload document\n:::\n\n## Embed Code With knitr\n\n### Code Chunks\n\nSurround code chunks with ```` ```{r} ```` and ```` ``` ```` or use the Insert Code Chunk button.\nAdd a chunk label and/or chunk options inside the curly braces after `r`.\n\n\n\n\n````{.default}\n```{r chunk-label, include = FALSE}\n```\n````\n\n\n\n### Set Global Options\n\nSet options for the entire document in the first chunk.\n\n\n\n\n````{.default}\n```{r include = FALSE}\nknitr::opts_chunk$set(message = FALSE)\n```\n````\n\n\n\n### Inline Code\n\nInsert `` `r ` `` into text sections.\nCode is evaluated at render and results appear as text.\n\nThe markdown text\n\n``` \nBuilt with `r getRversion()` \n```\n\nwill render as \"Built with 4.4.0\" in the output file.\n\n### Chunk Options\n\n| Option | Default | Effects |\n|--------------------------|-------------|--------------------------------------------------------------------------------------------------------------|\n| `echo` | `TRUE` | display code in output document |\n| `error` | `FALSE` | TRUE (display error messages in doc), FALSE (stop render when error occurs) |\n| `eval` | `TRUE` | run code in chunk |\n| `include` | `TRUE` | include chunk in doc after running |\n| `message` | `TRUE` | display code messages in document |\n| `warning` | `TRUE` | display code warnings in document |\n| `results` | `\"markup\"` | `\"asis\"` (pass through results), `\"hide\"` (don't display results), `\"hold\"` (put all results below all code) |\n| `fig.align` | `\"default\"` | `\"left\"`, `\"right\"`, or `\"center\"` |\n| `fig.alt` | `NULL` | alt text for a figure |\n| `fig.cap` | `NULL` | figure caption as a character string |\n| `fig.path` | `\"figure/\"` | prefix for generating file paths |\n| `fig.width & fig.height` | `7` | plot dimensions in inches |\n| `out.width` | | rescales output width, e.g. `\"75%\"`, `\"300px\"` |\n| `collapse` | `FALSE` | collapse all sources & output into a single block |\n| `comment` | `\"##\"` | prefix for each line of results |\n| `child` | `NULL` | file(s) to knit and then include |\n| `purl` | `TRUE` | include or exclude a code chunk when extracting source code with `knitr::purl()` |\n\n: Table of chunk options. The first column is the option name, the second column is the option's default value, the third column describes what the option does.\n\nSee more options and defaults by running `str(knitr::opts_chunk$get())`.\n\n## Insert Citations\n\nCreate citations from a bibliography file, a Zotero library, or from DOI references.\n\n### Build Your Bibliography\n\n- Add BibTex or CSL bibliographies to the YAML header.\n\n ``` yaml\n ---\n title: \"My Document\"\n bibliography: references.bib\n link-citations: TRUE\n ---\n ```\n\n- If Zotero is installed locally, your main library will automatically be available.\n\n- Add citations by DOI by searching \"from DOI\" in the **Insert Citation** dialog.\n\n### Insert Citations\n\n- Access the **Insert Citations** dialog in the Visual Editor by clicking the **\\@** symbol in the toolbar or by clicking **Insert \\> Citation.**\n- Add citations with markdown syntax by typing `[@cite]` or `@cite`.\n\n## Insert Tables\n\nOutput data frames as tables using `kable(data, caption)`.\n\n\n\n\n````{.default}\n```{r}\ndata <- faithful[1:4,]\nknitr::kable(data, caption = \"Tables with kable\")\n```\n````\n\n\n\nOther table packages include **flextable**, **gt**, and **kableExtra**.\n\n## Write With Markdown\n\nThe syntax on the left renders as the output on the right.\n\n+---------------------------------------------+--------------------------------------------------------------------------+\n| # Markdown Syntax | # Rendered Output |\n| | |\n| ``` | Plain text. |\n| Plain text. | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | End a line with two spaces to |\n| End a line with two spaces to | |\n| start a new paragraph. | start a new paragraph. |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | Also end a line with a backslash |\n| Also end a line with a backslash\\ | |\n| to make a new line. | to make a new line. |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | *italics* and **bold** |\n| *italics* and **bold** | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | superscript^2^ /subscript~2~ |\n| superscript^2^/subscript~2~ | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ~~strike through~~ |\n| ~~strike through~~ | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | escaped: \\* \\_ \\\\ |\n| escaped: \\* \\_ \\\\ | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | en dash: --, em dash: --- |\n| en dash: --, em dash: --- | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | # Header 1 |\n| # Header 1 | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ## Header 2 |\n| ## Header 2 | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ... |\n| ... | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ###### Header 6 |\n| ###### Header 6 | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | - unordered list |\n| - unordered list | |\n| - item 2 | - item 2 |\n| - item 2a (indent 1 tab) | |\n| - item 2b | - item 2a (indent 1 tab) |\n| ``` | |\n| | - item 2b |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | 1. ordered list |\n| 1. ordered list | |\n| 2. item 2 | 2. item 2 |\n| - item 2a (indent 1 tab) | |\n| - item 2b | - item 2a |\n| ``` | |\n| | - item 2b |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | |\n| | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | [This is a link.](https://posit.co/) |\n| [This is a link.](link url) | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | [This is another link.](https://posit.co/) |\n| [This is another link.][id]. | |\n| | |\n| At the end of the document: | |\n| [id]: link url | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | ![R Markdown logo](images/rmarkdown-logo.png){width=\"300\"} |\n| ![Caption](image.png) | |\n| | |\n| or | |\n| | |\n| ![Caption](id2) | |\n| | |\n| At the end of the document include: | |\n| [id2]: image.png | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | `verbatim code` |\n| `verbatim code` | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ```` | ``` |\n| ``` | multiple lines |\n| multiple lines | of verbatim code |\n| of verbatim code | ``` |\n| ``` | |\n| ```` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | > block quotes |\n| > block quotes | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | equation: $e^{i \\pi} + 1 = 0$ |\n| equation: $e^{i \\pi} + 1 = 0$ | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | equation block: |\n| equation block: | |\n| $$E = mc^{2}$$ | $$ |\n| ``` | E = mc^{2} |\n| | $$ |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | horizontal rule: |\n| horizontal rule: | |\n| --- | ------------------------------------------------------------------------ |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| ``` | | Right | Left | Default | Center | |\n| |Right|Left|Default|Center| | |------:|:-----|---------|:------:| |\n| |----:|:---|-------|:----:| | | 12 | 12 | 12 | 12 | |\n| |12 |12 |12 |12 | | | 123 | 123 | 123 | 123 | |\n| |123 |123 |123 |123 | | | 1 | 1 | 1 | 1 | |\n| |1 |1 |1 |1 | | |\n| | : Caption text, example rendered table. |\n| Table: Caption text, example rendered table | |\n| ``` | |\n+---------------------------------------------+--------------------------------------------------------------------------+\n| HTML Tabsets | ## Results |\n| | |\n| ``` | ::: panel-tabset |\n| ## Results {.tabset} | ## Plots |\n| ### Plots | |\n| text | text |\n| | |\n| ### Tables | ## Tables |\n| more text | |\n| ``` | more text |\n| | ::: |\n+---------------------------------------------+--------------------------------------------------------------------------+\n\n: Table of markdown syntax and rendered examples. The syntax in the first column renders to the output in the second column.\n\n\n\n## Set Output Formats and Their Options in YAML\n\nUse the document's YAML header to set an **output format** and customize it with **output options**.\nIndent format 2 characters, indent options 4 characters.\n\n``` yaml\n---\ntitle: \"My Document\"\nauthor: \"Author Name\"\noutput:\n html_document: \n toc: true\n toc-location: left\n---\n```\n\n### Output Format Table\n\n| Output Format | Creates |\n|---------------------------|------------------------------|\n| `html_document` | .html |\n| `pdf_document`[^1] | .pdf |\n| `word_document` | Microsoft Word (.docx) |\n| `powerpoint_presentation` | Microsoft PowerPoint (.pptx) |\n| `odt_document` | OpenDocument Text |\n| `rtf_document` | Rich Text Format |\n| `md_document` | Markdown |\n| `github_document` | Markdown for Github |\n| `ioslides_presentations` | ioslides HTML slides |\n| `slidy_presentation` | Slidy HTML slides |\n| `beamer_presentation`[^2] | Beamer slides |\n\n: Table of output formats. The output format in the first column creates the file type in the second column.\n\n[^1]: PDFs and Beamer slides require LaTeX, use `tinytex::install_tinytex()`.\n\n[^2]: PDFs and Beamer slides require LaTeX, use `tinytex::install_tinytex()`.\n\nAlso see **flexdashboard**, **bookdown**, **distill**, and **blogdown**.\n\n### Output Options Table\n\n| Important Options | Description | HTML | PDF | MS Word | MS PPT |\n|----------------------|----------------------------------------------------------------------------------------|------|-----|---------|--------|\n| anchor_sections | Show section anchors on mouse hover (TRUE or FALSE) | X | | | |\n| citation_package | The LaTeX package to process citations (\"default\", \"natbib\", biblatex\") | | | | |\n| code_download | Give readers an option to download the .Rmd source code (TRUE or FALSE) | X | | | |\n| code_folding | Let readers toggle the display of R code (\"none\", \"hide\", or \"show\") | X | | | |\n| css | CSS or SCSS file to use to style the document (e.g. \"style.css\") | X | | | |\n| dev | Graphics device to use for figure output (e.g. \"png\", \"pdf\") | X | X | | |\n| df_print | Method for printing data frames (\"default\", \"kable\", \"tibble\", \"paged\") | X | X | X | X |\n| fig_caption | Should figures be rendered with captions (TRUE or FALSE) | X | X | X | X |\n| highlight | Syntax highlighting (\"tango\", \"pygments\", \"kate\", \"zenburn\", \"textmate\") | X | X | X | |\n| includes | File of content to place in doc (\"in_header\", \"before_body\", \"after_body\") | X | X | | |\n| keep_md | Keep the Markdown .md file generated by knitting (TRUE or FALSE) | X | X | X | X |\n| keep_tex | Keep the intermediate TEX file used to convert to PDF (TRUE or FALSE) | | X | | |\n| latex_engine | LaTeX engine for producing PDF output (\"pdflatex\", \"xelatex\", or \"lualatex\") | | X | | |\n| reference_docx/\\_doc | docx/pptx file containing styles to copy in the output (e.g. \"file.docx\", \"file.pptx\") | | | X | X |\n| theme | Theme options (see Bootswatch and Custom Themes below) | X | | | |\n| toc | Add a table of contents at start of document (TRUE or FALSE) | X | X | X | X |\n| toc_depth | The lowest level of headings to add to table of contents (e.g. 2, 3) | X | X | X | X |\n| toc_float | Float the table of contents to the left of the main document content (TRUE or FALSE) | X | | | |\n\n: Table of output options. The first column is the option name, the second column is the description and possible values, and then remaining columns show what file types each option can be applied to.\n\nUse `?` to see all of a format's options, e.g. `?html_document`\n\n## More Header Options\n\n### Parameters\n\nParameterize your documents to ruse with new inputs (e.g. data, values, etc.).\n\n1. **Add parameters** in the header as sub-values of `params`.\n\n ``` yaml\n ---\n params:\n state: \"hawaii\"\n ---\n ```\n\n2. **Call parameters** in code using `params$name`.\n\n\n\n \n ````{.default}\n ```{r}\n data <- df[,params$state]\n summary(data)\n ```\n ````\n\n\n\n3. **Set parameters** with Knit with Parameters or the params argument of `render()`.\n\n### Reusable Templates\n\n1. **Create a new package** with an inst/rmarkdown/templates directory.\n\n2. **Add a folder** containing **template.yaml** (below) and **skeleton.Rmd** (template contents).\n\n ``` yaml\n ---\n name: \"My Template\"\n ---\n ```\n\n3. **Install** the package to access template by going to **File \\> New R Markdown \\> From Template**.\n\n### Bootswatch Themes\n\nCustomize HTML documents with Bootswatch themes from the **bslib** package using the theme output option.\nUse `bslib::bootswatch_themes()` to list available themes.\n\n``` yaml\n---\ntitle: \"My Document\"\nauthor: \"Author Name\"\noutput:\n html_document:\n theme:\n bootswatch: solar\n---\n```\n\n### Custom Themes\n\nCustomize individual HTML elements using bslib variables.\nUse `?bs_theme` to see more variables.\n\n``` yaml\n---\noutput:\n html_document:\n theme:\n bg: \"#121212\"\n fg: \"#E4E4E4\"\n base_font:\n google: \"Prompt\"\n---\n```\n\nMore on **bslib** at .\n\n### Styling With CSS and SCSS\n\nAdd CSS and SCSS to your documents by adding a path to a file with the **css** option in the YAML header.\n\n``` yaml\n---\ntitle: \"My Document\"\nauthor: \"Author Name\"\noutput:\n html_document:\n css: \"style.css\"\n---\n```\n\nApply CSS styling by writing HTML tags directly or:\n\n- Use markdown to apply style attributes inline.\n\n - Bracketed Span\\\n `A [green]{.my-color} word.` will render as \"A [green]{style=\"color: green\"} word.\"\n\n - Fenced Div\n\n ``` \n :::{.my-color}\n All of these words\n are green\n :::\n ```\n\n will render as\n\n ::: {style=\"color: green\"}\n All of these words\n\n are green.\n :::\n\n- Use the Visual Editor.\n Go to **Format \\> Div/Span** and add CSS styling directly with Edit Attributes.\n\n### Interactivity\n\nTurn your report into an interactive Shiny document in 4 steps:\n\n1. Add `runtime: shiny` to the YAML header.\n\n ``` yaml\n ---\n output: html_document\n runtime: shiny\n ---\n ```\n\n2. Call Shiny input functions to embed input objects.\n\n3. Call Shiny output functions to embed reactive output.\n\n\n\n \n ````{.default}\n ```{r echo = FALSE}\n numericInput(\"n\", \"How many cars?\", 5)\n \n renderTable({\n head(cars, input$n)\n })\n ```\n ````\n\n\n\n4. Render with `rmarkdown::run()` or click **Run Document** in RStudio IDE.\n\nAlso see Shiny Prerendered for better performance.\n.\n\nEmbed a complete Shiny app into your document with `shiny::shinyAppDir()`.\nMore at .\n\n## Render\n\nWhen you render a document, rmarkdown:\n\n1. Runs the code and embeds results and text into an .md file with knitr.\n2. Converts the .md file into the output format with Pandoc.\n\n**Save,** then **Knit** to preview the document output.\nThe resulting HTML/PDF/MS Word/etc.\ndocument will be created and saved in the same directory as the .Rmd file.\n\nUse `rmarkdown::render()` to render/knit in the R console.\nSee `?render` for available options.\n\n## Share\n\n**Publish on Posit Connect** to share R Markdown documents securely, schedule automatic updates, and interact with parameters in real-time.\n.\n\n------------------------------------------------------------------------\n\nCC BY SA Posit Software, PBC • [info\\@posit.co](mailto:info@posit.co) • [posit.co](https://posit.co)\n\nLearn more at [rmarkdown.rstudio.com](https://rmarkdown.rstudio.com/).\n\nUpdated: 2024-05.\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\npackageVersion(\"rmarkdown\")\n```\n\n::: {.cell-output .cell-output-stdout}\n\n```\n[1] '2.27'\n```\n\n\n:::\n:::\n\n\n\n------------------------------------------------------------------------\n", "supporting": [], "filters": [ "rmarkdown/pagebreak.lua" diff --git a/html/images/logo-rmarkdown.png b/html/images/logo-rmarkdown.png index 3d04c84f..31b4d620 100644 Binary files a/html/images/logo-rmarkdown.png and b/html/images/logo-rmarkdown.png differ diff --git a/html/rmarkdown.qmd b/html/rmarkdown.qmd index 1b5b38d7..de99ef12 100644 --- a/html/rmarkdown.qmd +++ b/html/rmarkdown.qmd @@ -139,43 +139,25 @@ will render as "Built with `r getRversion()`" in the output file. ### Chunk Options -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | Option | Default | Effects | -+==========================+=============+==============================================================================================================+ +|--------------------------|-------------|--------------------------------------------------------------------------------------------------------------| | `echo` | `TRUE` | display code in output document | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `error` | `FALSE` | TRUE (display error messages in doc), FALSE (stop render when error occurs) | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `eval` | `TRUE` | run code in chunk | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `include` | `TRUE` | include chunk in doc after running | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `message` | `TRUE` | display code messages in document | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `warning` | `TRUE` | display code warnings in document | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `results` | `"markup"` | `"asis"` (pass through results), `"hide"` (don't display results), `"hold"` (put all results below all code) | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `fig.align` | `"default"` | `"left"`, `"right"`, or `"center"` | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `fig.alt` | `NULL` | alt text for a figure | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `fig.cap` | `NULL` | figure caption as a character string | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `fig.path` | `"figure/"` | prefix for generating file paths | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `fig.width & fig.height` | `7` | plot dimensions in inches | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `out.width` | | rescales output width, e.g. `"75%"`, `"300px"` | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `collapse` | `FALSE` | collapse all sources & output into a single block | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `comment` | `"##"` | prefix for each line of results | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `child` | `NULL` | file(s) to knit and then include | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ | `purl` | `TRUE` | include or exclude a code chunk when extracting source code with `knitr::purl()` | -+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------+ : Table of chunk options. The first column is the option name, the second column is the option's default value, the third column describes what the option does. @@ -419,45 +401,26 @@ Also see **flexdashboard**, **bookdown**, **distill**, and **blogdown**. ### Output Options Table -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| Important Options | Description | HTML | PDF | MS Word | MS PPT | -+======================+========================================================================================+======+======+=========+========+ -| anchor_sections | Show section anchors on mouse hover (TRUE or FALSE) | X | | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| citation_package | The LaTeX package to process citations ("default", "natbib", biblatex") | | | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| code_download | Give readers an option to download the .Rmd source code (TRUE or FALSE) | X | | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| code_folding | Let readers toggle the display of R code ("none", "hide", or "show") | X | | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| css | CSS or SCSS file to use to style the document (e.g. "style.css") | X | | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| dev | Graphics device to use for figure output (e.g. "png", "pdf") | X | X | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| df_print | Method for printing data frames ("default", "kable", "tibble", "paged") | X | X | X | X | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| fig_caption | Should figures be rendered with captions (TRUE or FALSE) | X | X | X | X | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| highlight | Syntax highlighting ("tango", "pygments", "kate", "zenburn", "textmate") | X | X | X | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| includes | File of content to place in doc ("in_header", "before_body", "after_body") | X | X | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| keep_md | Keep the Markdown .md file generated by knitting (TRUE or FALSE) | X | X | X | X | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| keep_tex | Keep the intermediate TEX file used to convert to PDF (TRUE or FALSE) | | X | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| latex_engine | LaTeX engine for producing PDF output ("pdflatex", "xelatex", or "lualatex") | | X | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| reference_docx/\_doc | docx/pptx file containing styles to copy in the output (e.g. "file.docx", "file.pptx") | | | X | X | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| theme | Theme options (see Bootswatch and Custom Themes below) | X | | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| toc | Add a table of contents at start of document (TRUE or FALSE) | X | X | X | X | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| toc_depth | The lowest level of headings to add to table of contents (e.g. 2, 3) | X | X | X | X | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ -| toc_float | Float the table of contents to the left of the main document content (TRUE or FALSE) | X | | | | -+----------------------+----------------------------------------------------------------------------------------+------+------+---------+--------+ +| Important Options | Description | HTML | PDF | MS Word | MS PPT | +|----------------------|----------------------------------------------------------------------------------------|------|-----|---------|--------| +| anchor_sections | Show section anchors on mouse hover (TRUE or FALSE) | X | | | | +| citation_package | The LaTeX package to process citations ("default", "natbib", biblatex") | | | | | +| code_download | Give readers an option to download the .Rmd source code (TRUE or FALSE) | X | | | | +| code_folding | Let readers toggle the display of R code ("none", "hide", or "show") | X | | | | +| css | CSS or SCSS file to use to style the document (e.g. "style.css") | X | | | | +| dev | Graphics device to use for figure output (e.g. "png", "pdf") | X | X | | | +| df_print | Method for printing data frames ("default", "kable", "tibble", "paged") | X | X | X | X | +| fig_caption | Should figures be rendered with captions (TRUE or FALSE) | X | X | X | X | +| highlight | Syntax highlighting ("tango", "pygments", "kate", "zenburn", "textmate") | X | X | X | | +| includes | File of content to place in doc ("in_header", "before_body", "after_body") | X | X | | | +| keep_md | Keep the Markdown .md file generated by knitting (TRUE or FALSE) | X | X | X | X | +| keep_tex | Keep the intermediate TEX file used to convert to PDF (TRUE or FALSE) | | X | | | +| latex_engine | LaTeX engine for producing PDF output ("pdflatex", "xelatex", or "lualatex") | | X | | | +| reference_docx/\_doc | docx/pptx file containing styles to copy in the output (e.g. "file.docx", "file.pptx") | | | X | X | +| theme | Theme options (see Bootswatch and Custom Themes below) | X | | | | +| toc | Add a table of contents at start of document (TRUE or FALSE) | X | X | X | X | +| toc_depth | The lowest level of headings to add to table of contents (e.g. 2, 3) | X | X | X | X | +| toc_float | Float the table of contents to the left of the main document content (TRUE or FALSE) | X | | | | : Table of output options. The first column is the option name, the second column is the description and possible values, and then remaining columns show what file types each option can be applied to. diff --git a/keynotes/rmarkdown.key b/keynotes/rmarkdown.key index 08508d35..ba52a53e 100644 Binary files a/keynotes/rmarkdown.key and b/keynotes/rmarkdown.key differ diff --git a/pngs/rmarkdown.png b/pngs/rmarkdown.png index a16eda17..9854cc08 100644 Binary files a/pngs/rmarkdown.png and b/pngs/rmarkdown.png differ diff --git a/rmarkdown.pdf b/rmarkdown.pdf index efc8a4f1..343a45d3 100644 Binary files a/rmarkdown.pdf and b/rmarkdown.pdf differ