arrange: Reorder frames in a stop-motion film

View source: R/arrange.R

arrangeR Documentation

Reorder frames in a stop-motion film

Description

Returns a new magick-image object with frames placed in the order given by order. Use this after read when the lexicographic filename sort does not match the intended frame sequence.

Usage

arrange(images, order)

Arguments

images

an object of class magick-image to reorder.

order

integer vector of frame indices giving the desired order. Must be a permutation of 1:length(images) (every frame index appearing exactly once).

Value

a magick-image object with frames in the requested order.

Verbosity

After each operation a message listing the updated frame sequence is printed in interactive sessions. Use stopmotion_verbosity(FALSE) to suppress these messages, or set options(stopmotion.verbose = FALSE) in your script or ‘.Rprofile’.

Examples


  dino_dir <- system.file("extdata", package = "stopmotion")
  images <- read(dir = dino_dir)
  # Swap the first and second frame.
  images <- arrange(images, order = c(2L, 1L, seq(3L, 10L)))


stopmotion documentation built on March 24, 2026, 5:06 p.m.