Francisco Yira Albornoz February 9th, 2019
-
Using the R Markdown quick reference, figure out how to:
- Add a footnote.
- Add a horizontal rule.
- Add a block quote.
This is a block quote
This is a horizontal rule
This is a footnote 1
- Copy and paste the contents of
diamond-sizes.Rmd
from https://github.com/hadley/r4ds/tree/master/rmarkdown in to a local R markdown document. Check that you can run it, then add text after the frequency polygon that describes its most striking features.
(answers in diamond-sizes.Rmd
inside this repo)
-
Add a section that explores how diamond sizes vary by cut, colour, and clarity. Assume you’re writing a report for someone who doesn’t know R, and instead of setting
echo = FALSE
on each chunk, set a global option. -
Add a section that describes the largest 20 diamonds, including a table that displays their most important attributes.
-
Modify
diamonds-sizes.Rmd
to usecomma()
to produce nicely formatted output. Also include the percentage of diamonds that are larger than 2.5 carats. -
Set up a network of chunks where
d
depends onc
andb
, and bothb
andc
depend ona
. Have each chunk printlubridate::now()
, setcache = TRUE
, then verify your understanding of caching.
lubridate::now()
## [1] "2022-06-18 18:09:14 -04"
lubridate::now()
## [1] "2022-06-18 18:09:14 -04"
lubridate::now()
## [1] "2022-06-18 18:09:14 -04"
lubridate::now()
## [1] "2022-06-18 18:09:14 -04"
Footnotes
-
Here is the footnote. ↩