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
)
matrix, or data frame containing numeric columns
tour path generator
the method used to render the projected data,
e.g. display_xy
, display_pcp
Name of gif file (default = "animation.gif")
other options passed to png
angle (in radians) per frame
number of frames in output
default FALSE. If TRUE, rescale all variables to range [0,1]
if true, sphere all variables
starting projection. If NULL
, uses path default.
Logical for gifski to loop or not, default=TRUE
if (FALSE) {
# 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)
}
}