knitr::opts_chunk$set(echo = FALSE,message=FALSE, warning=FALSE, fig.width=6, fig.height=3, out.width="70%", fig.align="center", size = "footnotesize") library(FinMetric) gof <- tibble::tribble( ~raw, ~clean, ~fmt, "nobs", "N", 0, "r.squared", "$R^2$", 2) def.chunk.hook <- knitr::knit_hooks$get("chunk") knitr::knit_hooks$set(chunk = function(x, options) { x <- def.chunk.hook(x, options) ifelse(options$size != "normalsize", paste0("\n \\", options$size,"\n\n", x, "\n\n \\normalsize"), x) }) plot_task <- function(...){ ggplot(...) + theme_bw() + ggthemes::scale_colour_stata("s2color") + ggthemes::scale_fill_stata("s2color") + theme(legend.position = "bottom") + scale_linetype_manual(values = c("solid", "longdash", "dotted")) }
This is an R Markdown presentation. 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.
summary(cars)
plot(pressure)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.