--
knitr::include_graphics("https://media1.giphy.com/media/777Aby0ZetYE8/giphy.gif?cid=ecf05e47fxfri9ro2qxy8i7jhnalmh6lsnmpabijv8e8oo5n&rid=giphy.gif&ct=g")
# This is the recommended set up for this {memory} package # you might reset include = F for your book if you aren't wanting to communicate about knitr settings knitr::opts_chunk$set(fig.width = 6, message = FALSE, warning = FALSE, comment = "", cache = F, error = T) library(flipbookr) library(tidyverse) library(ggmemory)
--
# formatting script is a bit manual at this point # Saved history in RStudio at least does not preserve user indentation # User may use savehistory(file = "my_history.R") to recall history, # or send history manually from history pane to .R File # then w/ .R script of interest open, restore indentation # (and get a lot of other nice formatting) via # rstudioapi::executeCommand("reformatCode") # or Code -> Reformat Code from RStudio GUI # here's the contents of one saved history that's been reformatted readLines("./ggplots_script.R")
# then indentation will be ready for {memory}'s parsing formatted_history_script <- "./ggplots_script.R" # looks for pipelines starting with gg* my_executions <- r_code_extract_code_list(script_path = formatted_history_script) my_executions
class: inverse, middle, center
--
--
flipbookr::chunk_reveal(code_seq = my_executions)
r flipbookr::chunk_reveal(code_seq = my_executions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.