I am trying to install gganimate in Windows 7. I have already added Path to ImageMagick and below are the codes I used in my attempt to install it.
library(httr)
set_config(config(ssl_verifypeer = 0L))
library(devtools)
library(RCurl)
devtools::install_github("RcppCore/Rcpp")
devtools::install_github("dgrtwo/gganimate")
install.packages("gapminder")
library(gapminder)
library(ggplot2)
theme_set(theme_bw())
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color =continent, frame = year)) +
geom_point() +
scale_x_log10()
library(gganimate)
install.packages("cowplot")
install.packages("animation")
library(animation)
ani.options(convert = shQuote('C:/Program Files/ImageMagick-7.0.3- Q16/magick.exe'))
gganimate(p)
But I get the following error after I run the last line gganimate(p): Error
The error is:
Executing: ""\"C:/Program Files/ImageMagick-7.0.3-Q16/magick.exe\"" -loop 0 -dispose none -delay 0 plot1.png -dispose previous -delay 100 plot2.png plot3.png plot4.png plot5.png plot6.png plot7.png plot8.png plot9.png plot10.png plot11.png plot12.png plot13.png "fileb4835f936f2.gif"" The filename, directory name, or volume label syntax is incorrect. an error occurred in the conversion... see Notes in ?im.convert Error in file(file, "rb") : cannot open the connection In addition: Warning messages: 1: running command 'C:\Windows\system32\cmd.exe /c "\"C:/Program Files/ImageMagick-7.0.3-Q16/magick.exe\"" --version' had status 1 2: running command 'C:\Windows\system32\cmd.exe /c ""\"C:/Program Files/ImageMagick-7.0.3-Q16/magick.exe\"" -loop 0 -dispose none -delay 0 plot1.png -dispose previous -delay 100 plot2.png plot3.png plot4.png plot5.png plot6.png plot7.png plot8.png plot9.png plot10.png plot11.png plot12.png plot13.png "fileb4835f936f2.gif""' had status 1 3: In cmd.fun(convert) : '""\"C:/Program Files/ImageMagick-7.0.3-Q16/magick.exe\"" -loop 0 -dispose none -delay 0 plot1.png -dispose previous -delay 100 plot2.png plot3.png plot4.png plot5.png plot6.png plot7.png plot8.png plot9.png plot10.png plot11.png plot12.png plot13.png "fileb4835f936f2.gif""' execution failed with error code 1 4: running command '""\"C:/Program Files/ImageMagick-7.0.3-Q16/magick.exe\"" -loop 0 -dispose none -delay 0 plot1.png -dispose previous -delay 100 plot2.png plot3.png plot4.png plot5.png plot6.png plot7.png plot8.png plot9.png plot10.png plot11.png plot12.png plot13.png "fileb4835f936f2.gif""' had status 127 5: In file(file, "rb") : cannot open file 'C:\Users\shammun\AppData\Local\Temp\RtmpuSfr4m/gganimate\fileb4835f936f2.gif': No such file or directory