age_animate: age_animate

View source: R/age_animated.R

age_animateR Documentation

age_animate

Description

visualize age interaction with gganimate

Usage

age_animate(d, weight_sigma = 2, rep_steps = 100, test_age = NULL, ...)

Arguments

d

dataframe with age

weight_sigma

how fast points disappear (higher is faster)

rep_steps

how many steps to plot

test_age

show only a single frame at 'test_age' instead of animating

...

additional ggplot aesthetics. probably want x= and y= #@importFrom viridis scale_color_viridis #@importFrom gganimate ease_aes transition_time

Examples

d <- data.frame(age=seq(10,30, length.out=8),
                x=runif(8,0,10),
                y=runif(8,0,10))
p  <- age_animate(d, rep_steps=16, x=x, y=y)
p2 <- age_animate(d, test_age=10) + aes(x=x,y=y) + cowplot::theme_cowplot() + theme(legend.position='none')

LabNeuroCogDevel/LNCDR documentation built on Oct. 13, 2023, 4:31 a.m.