animate_gif: Create a gif animation using rasterVis::levelplot() and...

View source: R/animate.R

animate_gifR Documentation

Create a gif animation using rasterVis::levelplot() and ImageMagick's convert

Description

This is Unix/Linux centric.

Usage

animate_gif(
  R,
  ...,
  mains = names(R),
  other_layers = NULL,
  width = 480,
  height = 480,
  output_filename = file.path(".", "animation.gif"),
  tmppath = tempfile(pattern = "animation"),
  convert_extra = "-loop 0 -delay 50"
)

Arguments

R

a multi-layer raster object

...

further arguments for rasterVis::levelplot like

  • margin

  • at

  • par.settings

mains

character vector of names to apply to each plot, by default the layer names

other_layers

a list of one or more latticeExtra::layer or list of layers

width

numeric image width in pixels

height

image height in pixels

output_filename

the name of the output file, by default 'animation.gif'

tmppath

string, temporary working directory to use

convert_extra

character of extra conver arguments. Defaults to "-loop 0 -delay = 50" for infinte looping and 0.5s per frame

Value

the numeric value returned by convert

See Also

http://www.imagemagick.org/Usage/anim_basics/

http://imagemagick.org/script/command-line-processing.php


BigelowLab/dismotools documentation built on Jan. 4, 2023, 11:24 a.m.