if (!require("here")) install.packages("here") show_results <- params$show_results knitr::opts_chunk$set( echo = show_results, eval = TRUE, include = params$show_results, cache = TRUE )
source(here::here("R", "package_list.R")) source(here::here("R", "local_functions.R"))
mtcars <- mtcars
mpg_cyl_plot <- mtcars %>% ggplot() + aes(x = mpg, y = cyl) + geom_point() mpg_cyl_plot save_plot(mpg_cyl_plot, format = "tiff", trim = TRUE) mpg_hp_plot <- mtcars %>% ggplot() + aes(x = mpg, y = hp) + geom_point() mpg_hp_plot save_plot(mpg_hp_plot, dir_to_save = here::here("output", "supp"), format = "tiff", trim = TRUE)
if ("devtools" %in% installed.packages()) devtools::session_info()
if ("git2r" %in% installed.packages() & git2r::in_repository(path = ".")) git2r::repository(here::here())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.