无法调用gganimate函数

时间:2019-02-11 15:16:44

标签: r ggplot2 gganimate

我从CRAN安装了gganimate个软件包,并运行提供的示例代码:

library(ggplot2)
library(gganimate)
library(gapminder)

ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, colour = country)) +
  geom_point(alpha = 0.7, show.legend = FALSE) +
  scale_colour_manual(values = country_colors) +
  scale_size(range = c(2, 12)) +
  scale_x_log10() +
  facet_wrap(~continent) +
  # Here comes the gganimate specific bits
  labs(title = 'Year: {frame_time}', x = 'GDP per capita', y = 'life expectancy') +
  transition_time(year) +
  ease_aes('linear')

但是出现以下错误:

  

UseMethod(“ conditionCall”)中的错误:无适用的方法   “ conditionCall”应用于“ NULL”类的对象

我已经安装了magick,所以可以弄清楚我们在这里发生了什么。 任何建议将不胜感激。

0 个答案:

没有答案