-
-
Save thomasp85/05169ad44ddcc8ed56da6ff7bf7fbe36 to your computer and use it in GitHub Desktop.
library(gapminder) | |
library(ggplot2) | |
library(gganimate) | |
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, colour = country)) + | |
geom_point(alpha = 0.7) + | |
scale_colour_manual(values = country_colors) + | |
scale_size(range = c(2, 12)) + | |
scale_x_log10() + | |
facet_wrap(~continent) + | |
theme(legend.position = 'none') + | |
labs(title = 'Year: {frame_time}', x = 'GDP per capita', y = 'life expectancy') + | |
transition_time(year) + | |
ease_aes('linear') | |
animate(p, 100, 10) |
do you have gganimate installed from CRAN?
do you have gganimate installed from CRAN?
I downloaded it from CRAN, then saw that you needed devtools to be able to use transition_time(). So I was finally able to install devtools to install directly from github but now getting "Permission Denied" and failure to install "gganimate" from GitHub.
You don’t need devtools. Just the regular cran install. This is a super old conversation so don’t expect the recommendations given here to be current🙂
Huh odd, because I installed it originally through CRAN, but now when I call on the library it gives me:
"Error: package or namespace load failed for ‘gganimate’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘progress’
In addition: Warning message:
package ‘gganimate’ was built under R version 3.4.4 "
Did anyone ever figure this out? I'm having the same error and have devtools installed.