render_gif | R Documentation |
Render frames of animation to a gif file
render_gif(
data,
tour_path,
display,
gif_file = "animation.gif",
...,
apf = 1/10,
frames = 50,
rescale = FALSE,
sphere = FALSE,
start = NULL,
loop = TRUE
)
data |
matrix, or data frame containing numeric columns |
tour_path |
tour path generator |
display |
the method used to render the projected data,
e.g. |
gif_file |
Name of gif file (default = "animation.gif") |
... |
other options passed to |
apf |
angle (in radians) per frame |
frames |
number of frames in output |
rescale |
default FALSE. If TRUE, rescale all variables to range [0,1] |
sphere |
if true, sphere all variables |
start |
starting projection. If |
loop |
Logical for gifski to loop or not, default=TRUE |
## Not run:
# gifski needs to be installed to render a gif
if (requireNamespace("gifski", quietly = TRUE)) {
gif_file <- file.path(tempdir(), "test.gif")
render_gif(flea[, 1:6], grand_tour(), display_xy(), gif_file)
utils::browseURL(gif_file)
unlink(gif_file)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.