I am trying the code on the instruction page for animation view, however it give me this error: Error in function_list[i] :
could not find function “animation_opts”
Does anyone know how to access function? is there any other package i should download?
Here is the code I copied from the webpage.
data(gapminder, package = “gapminder”)
gg <- ggplot(gapminder, aes(gdpPercap, lifeExp)) +
geom_point(aes(size = pop, color = continent)) +
base <- gapminder %>%
plot_ly(x = ~gdpPercap, y = ~lifeExp, size = ~pop, text = ~country, hoverinfo = “text”) %>%
layout(xaxis = list(type = “log”))
add_markers(color = ~continent, frame = ~year, ids = ~country) %>%
animation_opts(1000, easing = “elastic”) %>%
animation_button(x = 1, xanchor = “right”, y = 0, yanchor = “bottom”) %>%
animation_slider(currentvalue = list(prefix = "YEAR ", font = list(color = “red”)))