In this example if you run you get a nice standard animation which has been used a lot. Also, showing at the top "Frame n of N". But what if you want it simply to say something in a string? e.g. have it read Str <- c('A', 'B', 'C',...) Obviously you would have to make sure the string length matches the number of frames. Is this possible?
p <- ggplot(iris, aes(x = Petal.Width, y = Petal.Length)) +
geom_point()
p
anim <- p + transition_states(Species,
transition_length = 2,
state_length = 1)
anim + ggtitle('Frame {frame} of {nframes}')