[R] convert command not found in movie3d (rgl package) in Mac OS X

Duncan Murdoch murdoch.duncan at gmail.com
Mon Jan 23 15:07:49 CET 2012


On 12-01-23 8:50 AM, Manabu Sakamoto wrote:
> Dear list,
>
> I gave up trying to fix my movie3d (rgl library) issue in my PC
> (completely black gif/png file) and went ahead and installed MacPorts
> and ImageMagick onto my iMac (OSX ver 10.6.8). I think ImageMagick is
> successfully installed in its default location (under /opt/local), and
> I ran movie3d but I get the following error:
>
> Error in system("convert --version", intern = TRUE) :
>    error in running command
> sh: convert: command not found
>
> so I'm guessing R can't find the "convert" executable file, which is
> in "/opt/local/bin", in its system search path, which I presume is
> "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" that I got using
> Sys.getenv("PATH").
>
> Does anyone know how I can resolve this? For instance, should I move
> or copy the convert executable file to an appropriate directory (which
> I don't really know where exactly, i.e. I can't find a folder "usr" in
> the Macintosh HD), or can I add "/opt/local/bin" to the R's search
> path?

I think the latter is easiest.  Just use Sys.setenv to set it, e.g.

Sys.setenv(PATH=paste("/opt/local/bin", Sys.getenv("PATH"), sep=":")

The setting will only last for the duration of your R session.

Duncan Murdoch



More information about the R-help mailing list