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)
}


muschellij2/recordscreen documentation built on May 21, 2019, 1:45 p.m.