Re: [问题] 使用animation的saveGIF出现error

楼主: gotodmcyo (键盘小妹)   2015-01-05 19:18:49
恩...时间有点久远所以就回文
刚好最近也在用 animation package做些东西
在 Mac 上装好 ImageMagick 跟 install.packages("animation")后没什么问题
由于明天要跟老板 meeting 就在win7上跑了一下
在存gif时也跑出了错误
google发现这篇https://github.com/yihui/animation/issues/55
在yulijia commented on 29 Nov 2014的留言有提到解答
有兴趣的朋友可以去看
但重点就是装开发版本的animation 有修正这个bug
下方是留言中的安装过程 code
# install the development version
install.packages('devtools')
library(devtools)
install_github("yihui/animation")
library(animation)
saveGIF({for (i in 1:10) plot(runif(10), ylim = 0:1)})
如果最后有顺利跑出gif就是成功了...
※ 引述《tokyo291 (工口工口)》之铭言:
: [问题类型]:
: 程式咨询
: [软件熟悉度]:
: 使用者(已经有用R 做过不少作品)
: [问题叙述]:
: 想把plot的动态图形存成GIF档,使用animation这个package
: 出现错误讯息,查了之后,执行这个结果需要安装ImageMagick
: 在下列网址可以找到安装档
: http://www.imagemagick.org/script/binary-releases.php
: 安装完之后,成功一次转出GIF档
: 在一次执行时就转不出来了...
: [程式范例]:
: > saveGIF({
: + for (i in 1:10) plot(runif(10), ylim = 0:1)
: + })
: Executing:
: "convert" -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png
: Rplot5.png
: Rplot6.png Rplot7.png Rplot8.png Rplot9.png Rplot10.png "animation.gif"
: 'convert" -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png
: Rplot5.png Rplot6.png Rplot7.png Rplot8.png Rplot9.png Rplot10.png
: "animation.gif' 不是内部或外部命令、可执行的程式或批次档。
: 参数无效 - 0
: an error occurred in the conversion... see Notes in ?im.convert
: [1] FALSE
: 警告讯息:
: 1: 执行中命令 'C:\WINDOWS\system32\cmd.exe /c "convert" -loop 0 -delay 100
: Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png Rplot6.png Rplot7.png
: Rplot8.png Rplot9.png Rplot10.png "animation.gif"' 已有状态 1
: 2: In cmd.fun(convert) :
: '"convert" -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png
: Rplot5.png Rplot6.png Rplot7.png Rplot8.png Rplot9.png Rplot10.png
: "animation.gif"' execution failed with error code 1
: 3: 执行中命令 '"convert" -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png
: Rplot4.png Rplot5.png Rplot6.png Rplot7.png Rplot8.png Rplot9.png Rplot10.png
: "animation.gif"' 已有状态 4
: 4: In normalizePath(path.expand(path), winslash, mustWork) :
: path[1]="animation.gif": 系统找不到指定的档案。
: [关键字]:
: animation/ImageMagick/saveGIF
作者: Wush978 (拒看低质媒体)   2015-01-05 22:42:00
谢谢分享

Links booklink

Contact Us: admin [ a t ] ucptt.com