gganimate: How to loop through all frames once?

I've been playing around with gganimate. I want to loop through my images once, i.e. have the animation stop when it reaches the maximum value. In this code:

anim = staticplot + transition_states(population_year, transition_length = 4, state_length = 1) +
view_follow(fixed_x = TRUE) +
labs(title = 'Job Category per Year : {closest_state}',
subtitle = "Place",
caption = "My Org")

I want the animation to stop when the maximum value of "population_year" is displayed.
I have tried to control the rendering with this statement: renderer = gifski_renderer(loop = F)
however, this returns the image to its initial state (i.e., the minimum value of "population_year").

I would appreciate any ideas about how to control the looping behavior.


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.