Suppose I have the three following plots:
p1 = hist(rnorm(1000,1,1), 10000)
p2 = hist(rnorm(1000,1,1), 10000)
p3 = hist(rnorm(1000,1,1), 10000)
Is there any way that these can be made into a "gif"?
gif_file <- ( "C:/Users/OneDrive/Documents/ref.gif")
save_gif((p1, p2, p3), gif_file, 1280, 720, res = 144)
I am not sure if this statement is intended to be used this way. Does anyone know if this is possible?
(Note: I know that you can do this with a loop (i.e. create p1, p2, p3 with a loop) , but I am specifically interested in knowing if this can be done when p1, p2, p3 have already been created. I also know that this is relatively straightforward to do if the plots were made in ggplot, but I am trying to do this with plots made in base R.).