Gganimate's converting error

I've been trying to plot some animations with David Robinson's (@drob) gganimate package.

The issue here is: When the gganimate::gganimate function tries to run the command to ImageMagick's "convert.exe" file, the C:\Program in C:\Program Files\ImageMagick-7.0.7-Q16\convert.exe is treated as a command and the prompt returns an error.

It can be fixed by just sending the command line with a double-quoted path to the "comand.exe" I think. However, do anybody knows if that could be caused by another factor that I could fix without having to change the package itself?

EDIT

The code I'm using is:

library(gapminder)
library(ggplot2)
library(gganimate)

p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
geom_point() +
scale_x_log10()

gganimate(p)

Assuming you have an up to date R installation, and the most recent version of ImageMagick installed, I found my initial plotting issues were resolved by reinstalling ImageMagick and selecting both of these options during setup:

1.Tick the "install legacy utilities" box, (which may explain any "I cannot find ImageMagick with convert = 'convert'" associated errors.
2. Also you should ensure you select the option to add ImageMagick to the system Path variable.

Not sure this exactly the same issue you are facing, but worth trying

1 Like

Well, I've had done it when I reached out to the community. I thought I would try it again just to be sure before replying...well, it worked in the second try, I don't know why but it worked.

I'll begin to be more meticulous than usual when coming up with some question in the community.

Anyways, thank you @johnmackintosh.