R库rgl虽然已安装,但找不到图像magick [英] R library rgl cannot find image magick although it is installed

查看:336
本文介绍了R库rgl虽然已安装,但找不到图像magick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

R库rgl找不到图像magick,虽然它是在cmd shell中安装并执行的。

R library rgl cannot find image magick although it is installed and executes from within a cmd shell.

所以这不起作用:

require(rgl)
open3d()
rgl.bringtotop()
plot3d(foo$x,foo$y,foo$thing,col =heat.colors(256)[1+round(foo$z*255)],xlab = '',ylab='',zlab='',radius=3,size=3,box=T,axes=F)
play3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 2)
movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 1)

因为barfs:

riting 'movie200.png'Writing 'movie003.png'
Error in movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 20) : 
  'ImageMagick' not found
In addition: Warning message:
running command 'C:\Windows\system32\cmd.exe /c convert --version' had status 4 

这里真正的问题是转换是一个windows命令。在Windows上,我相信 Imagemagick 使用 magick 作为命令。

The real issue here is that convert is a windows command. On Windows, I believe Imagemagick uses magick for its commands.

所以我认为rgl需要使用windows命令。

So I think rgl needs to use the windows command.

任何想法?

解决方法

movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 12,movie='un1qu3',dir = getwd())
system('magick -delay 10 un1qu3*.png out.gif')
file.remove(grep('un1qu\\d+\\.png',list.files(),value = T))


推荐答案

这是有点老问题,但我刚遇到同样的问题,似乎我设法解决了它。

It's a bit old question, but I I've just faced the same problem, and it seems I managed to solve it.

Rgl包是为了使用转换而构建的。来自Imagemagick的exe文件。问题是目前可用于Windows的IM版本不包含此文件,而是使用magick.exe。

The Rgl package was built to use the convert.exe file from Imagemagick. The problem is that the version of IM currently available for Windows does not contain this file, it uses the magick.exe instead.

为我解决问题的实际上是相当的simple:转到Program Files(或安装它的地方)的Imagemagick库,找到'magick.exe'文件,并将其重命名为'convert.exe'。 :)

What solved the problem for me was actually quite simple: go to the Imagemagick library in Program Files (or the place you installed it), find the 'magick.exe' file, and rename it to 'convert.exe'. :)

这篇关于R库rgl虽然已安装,但找不到图像magick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆