plot(pressure)
22 Test
22.1 Standards
22.1.1 For displaying figures:
22.1.2 For displaying code and even variable names
demo <- function(x)
variable_2
22.1.3 For sizing graphs and code-generated plots
- You can specify out-height or out-width as either pixels, inches, or percentages
- You can specify both using different units
- If you specify only one, the other should default to “auto” which keeps the figured scaled as in the original
22.1.4 For code annotation
library(tidyverse)
- 1
- make a df
- 2
- glimpse a df
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.0 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Rows: 5
Columns: 1
$ x <int> 1, 2, 3, 4, 5
22.1.5 For displaying color (like red questions)
this sentence is in red
This is an alternative method but more complex: I love R.
red yellow green blue
yellow background for better contrast
22.1.6 Callouts for questions
HTML:
RevealJS does not yet have callout collapse implemented. A workaround is to use code folding:
22.1.7 Conditional Content
Use divs to specify content to only appear in certain formats:
Will only appear in HTML.
22.1.8 Links to qmd files as plaintext
Normally, a link to a qmd file functions as a link to the rendered html of that file.
To link to a qmd file that is to be downloaded or viewed as raw text, you must link to the raw.github user content: