library(ggplot2) library(tidyverse) library(councildown) extrafont::loadfonts() knitr::knit_hooks$set(embed = hook_pdfembed) knitr::opts_chunk$set(echo = FALSE, embed = TRUE) knitr::opts_knit$set(root.dir = here::here())
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
You can also embed plots, for example, see Figure \@ref(fig:iris).
ggplot(iris, aes(Petal.Length, Petal.Width, color = Species)) + geom_point() + labs(title = "Irises", subtitle = "The most boring plot in the world") + theme_nycc() + scale_color_nycc()
You can also include nicely formatted tables, like Table \@ref(tab:cars2).
knitr::kable(head(mtcars), caption = "Some info about cars.", booktabs = TRUE)
This template is built on top of bookdown
, which enables several extensions to pandoc
markdown, including cross references. For a full overview of these extensions, see the bookdown
book.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.