gifrecordeR

gifrecordeR

CRAN RStudio mirror downloads

Easily record animated GIFs of your R web session straight client side with this htmlwidget wrapper for gifw00t. Use it for documentation, illustration, or fun. SVG support is weak/nonexistent currently, but I am working on it here at this branch.

Thanks to all the code and amazing examples from Yaron Naveh @yaronn. See his other unbelievable work, such as the >6,000 star blessed-contrib. He deserves all the credit and praise for this. I simply added the htmlwidget wrapper.

Installation

devtools::install_github("timelyportfolio/gifrecordeR")

Usage

library(gifrecordeR)
library(htmltools)

browsable(
  tagList(list(
    tags$div(
      id = "div_record",
      style = "width: 400px; height: 400px;",
      tags$h2(
        contentEditable = "true",
        "Recording Live ... (I'm editable)"
      ),
      tags$p(
        contentEditable = "true",
        "Feel free to change me.  Careful though it might be
        recorded in a GIF."
      )
    ),
    gifrecord("#div_record")
  ))
)

gif recording of example 1

In this next example, we record interaction with a rbokeh plot. I intentionally left the selector as the default body, so you can see what it looks like on screen.

library(gifrecordeR)
library(rbokeh)
library(htmltools)

browsable(
  tagList(
    list(
      figure()%>% ly_points(1:10),
      gifrecord()
    )
  )
)

gif recording of bokeh example

License