knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Here we do a simple screen recording:
library(recordscreen) out = start_screen_record(audio = FALSE, outfile = tempfile(fileext = ".gif")) Sys.sleep(4) res = end_screen_record(out) # stopifnot(file.exists(out$outfile)) if (file.exists(out$outfile)) { knitr::include_graphics(out$outfile, auto_pdf = FALSE) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.