Learn R Programming

rENA (version 0.3.0)

with_trajectory: Adds trajectories to an ENA plot.

Description

This function generates trajectories for the plotted points in the ENA plot based on the specified grouping variables. It supports options for jittering, animation, and scaling.

Usage

with_trajectory(
  x,
  ...,
  by = x$`_function.params`$conversation[1],
  add_jitter = TRUE,
  frame = 1100,
  transition = 1000,
  easing = "circle-in-out"
)

Value

Invisibly returns the modified ENA set object with updated plots.

Arguments

x

An ENA set object containing the plots.

...

Additional arguments passed to the plotting functions.

by

A character vector specifying the grouping variables for the trajectories. Default is the first conversation parameter in the ENA set.

add_jitter

Logical; if `TRUE`, adds jitter to the trajectory points. Default is `TRUE`.

frame

Numeric; the duration of each frame in the animation. Default is 1100.

transition

Numeric; the duration of the transition between frames. Default is 1000.

easing

A character string specifying the easing function for the animation. Default is "circle-in-out".