Here is the link to Desirée’s slides:
https://docs.google.com/presentation/u/0/d/1wk3ysJnE4-yNdJG-kDZlG9m418k6Dygy4WwlABQ7hjs/edit?pli=1
The R Markdown parts of the R4DS textbook are Chapters 27 and 29.
For a deeper dive into R Markdown, the official R Markdown text is R Markdown: The Definitive Guide. It is most useful to have as a reference.
Another great reference text for R Markdown that contains examples of many R Markdown features is R Markdown Cookbook.
I also recommend checking out RStudio website for R Markdown. The Getting Started and Gallery pages gives a visual overview of many of the things you can build with R Markdown.
Recreate a report: Download the R Markdown document and image above and store them in a new R Project alongside the cloudbuddy data from the course. Use the downloaded document as a starting point and modify it so that it ends up looking like this final report. Here are some tips:
The report purposefully contains a few errors that prevent the document from knitting. You should start by fixing these first.
There are ~15 other modifications you’ll need to make. Aside from loading packages and reading in data, you should not need to make substantial edits to the existing source code within the chunks. You also should not need to delete existing code chunks. There are a couple features which you may have to look up how to do using outside resources:
flatly
theme to your reportSave your modified report as
session-04-cloudbuddy.Rmd
.
Here is an annotated version of the final report to help you spot some of the differences.
Render a tufte document: Make sure the tufte R
package is installed. Make changes the YAML of your modified report so
that it knits as a tufte document. Save your tufte report as
session-04-tufte.Rmd
.
Knit to PDF: Create one new R Markdown document
from the new document icon in the IDE. Knit it to a PDF document. (You
may need to install LaTeX in order to build the PDF output — RStudio
will prompt you if this is necessary, or install the tinytex package and
then run this code: tinytex::install_tinytex()
).
session-04-pdf.Rmd
.session-04-cloudbuddy.Rmd
to a PDF document? Can you get it
to work?