knitr::opts_chunk$set(echo = TRUE) # Benchmark code chunks knitr::knit_hooks$set( time = function(before, envir) { t <- proc.time()['elapsed'] if(before) { envir$.elapsed <- t } else { paste(signif(t - envir$.elapsed), 'sec.') } } )
library(dplyr) library(here) library(tidyr)
```{R day12-1, code=readLines("2020/R/12-1.R"), time = TRUE}
### Part 2 ```{R day12-2, code=readLines("2020/R/12-2.R"), time = TRUE}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.