之无待续 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 C++使用Gunplot
    • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
    • ¥15 matlab数字图像处理频率域滤波
    • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
    • ¥15 ELGamal和paillier计算效率谁快?
    • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
    • ¥15 Arcgis相交分析无法绘制一个或多个图形
    • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
    • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
    • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)