之无待续 2019-05-03 15:12
浏览 2074

gganimate包的安装问题

已经安装了ImageMagick和devtools包
在cmd窗口测试ImageMagick可以将png图转换为gif图,测试语句:
+++++++++
magick convert *.png -delay 3 -loop 0 binom.gif
++++++++

安装gganimate,使用安装语句如下:
++++++++++++++++++++++++++++
install.packages("devtools")
devtools::install_github("dgrtwo/gganimate",force = T)
++++++++++++++++++++++++++++

安装提示
+++++++++++++++++++++
Downloading GitHub repo dgrtwo/gganimate@master
These packages have more recent versions available.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: gtable (0.2.0 -> 0.3.0) [CRAN]
5: lazyeval (0.2.1 -> 0.2.2) [CRAN]
6: R6 (2.3.0 -> 2.4.0) [CRAN]
7: Rcpp (1.0.0 -> 1.0.1) [CRAN]
8: rlang (0.3.1 -> 0.3.4) [CRAN]
9: stringi (1.2.4 -> 1.4.3) [CRAN]
10: stringr (1.3.1 -> 1.4.0) [CRAN]
11: tibble (2.0.1 -> 2.1.1) [CRAN]
Enter one or more numbers separated by spaces, or an empty line to cancel
1:
++++++++++++++++++++++++++++++++++++

然后选择1 ,就是全部安装
安装问题提示:
+++++++++++++
package ‘gtable’ successfully unpacked and MD5 sums checked
package ‘lazyeval’ successfully unpacked and MD5 sums checked
Error: (converted from warning) cannot remove prior installation of package ‘lazyeval
+++++++++++++

然后想使用gganimate
语句如下:
++++++++++++++++++++++++++++++++++++
library(gganimate)
library(ggplot2)

aq<-airquality
#按年-月-日整理日期
aq$date <- as.Date(paste(1973,aq$Month,aq$Day,sep="-"))
#每一幅图按Month生成
p<-ggplot(aq,aes(date,Temp,frame=Month,cumulative=T))+geom_line()
#显示ggplot2对象p的动画,并保存到指定名称的文件
gganimate(p,filename="aq_output.gif",title_frame=F)

+++++++++++++++++++++++++++++++++++++

提示错误:
+++++++++++++++++++++++

Error: It appears that you are trying to use the old API, which has been deprecated.
Please update your code to the new API or install the old version of gganimate
from https://github.com/thomasp85/gganimate/releases/tag/v0.1.1

+++++++++++++++++++++++

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
    • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
    • ¥15 乘性高斯噪声在深度学习网络中的应用
    • ¥15 运筹学排序问题中的在线排序
    • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛