-
-
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) |
Hi Thomas, this vis looks cool. However, I have a problem running the script. Two functions are not properly loaded
`
- Error: could not find function "transition_time"
- Error could not find function "animate"
`
Did anyone ever figure this out? I'm having the same error and have devtools installed.
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 "
but as I get
start_pause
error usingtransition_time()
, I addedbefore the
ggplot()
call. Shouldn't these variables be part of thetransition_time()
function instead of globals?setting them to 0 seems to mimic your settings