gif_file: Wrap a gif file for easy handling

View source: R/renderers.R

gif_fileR Documentation

Wrap a gif file for easy handling

Description

This is a simple class for gif files that takes care printing the file correctly in different environment (e.g. knitr, RStudio, etc.). If your renderer produces a gif file you can wrap the final output in gif_file to get all of these benefits for free.

Usage

gif_file(file)

## S3 method for class 'gif_image'
print(x, ...)

knit_print.gif_image(x, options, ...)

## S3 method for class 'gif_image'
split(x, f, drop = FALSE, ...)

Arguments

file

The gif file to be wrapped

x

A gif_image object

...

Arguments passed on

f

a ‘factor’ in the sense that as.factor(f) defines the grouping, or a list of such factors in which case their interaction is used for the grouping.

drop

logical indicating if levels that do not occur should be dropped (if f is a factor or a list).

Value

gif_file returns a gif_image object. split returns a list of magick-image objects and requires magick to work.


thomasp85/gganimate documentation built on Feb. 29, 2024, 11:16 p.m.