0

I am following a basic tutorial on gganimate:

p <- ggplot(iris, aes(x = Petal.Width, y = Petal.Length)) + 
geom_point()

When I try the snippet of code below:

p + transition_states(Species,
                  transition_length = 2,
                  state_length = 1)

I get the following error:

Error in l$setup_layer(d, plot) : attempt to apply non-function

I'm guessing it's something to do with package versions but could anyone help out?

Thanks

Z.Lin
  • 28,055
  • 6
  • 54
  • 94
Dasr
  • 777
  • 6
  • 16
  • The above code runs with no problem on my machine. If you suspect it has something to do with package versions, can you include that information in your question? e.g. edit your question with the output from `sessionInfo()` – Z.Lin Apr 10 '19 at 03:45
  • I have no idea why it was doing it. Now it has just fixed itself. Restarting R session didn't do it but switching off machine did. Who knows. – Dasr Apr 10 '19 at 09:01

0 Answers0