r - 无法调用 gganimate 函数
问题描述
我gganimate
从 CRAN 安装软件包并运行提供的示例代码:
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,所以可以弄清楚这里发生了什么。任何建议将不胜感激。
解决方案
推荐阅读
- flutter - 在键盘上方颤动额外/不需要的空间
- php - 在 laravel 中处理查询字符串以及它们有多安全
- excel - 复制问题 - 从一张纸粘贴到另一张纸以获取第二张纸
- android - BLE配对/绑定
- angular - 如何使用异步管道值处理`ngIf`?
- android - 在 DatePicker 上显示相同的日期,忽略设备的 TimeZone
- c# - 如何设计一个带 MaxLength 的 String 类?
- sql-server - 如何更改 Visual Studio 自动生成的数据库创建 SQL 脚本
- c# - 在 WPF 包 URI 中使用通配符的替代方法
- azure - Azure Functions - 并发问题