ERROR: dependency 'transformr' is not available for package 'gganimate'

Hello,

I was using the gganimate package and it worked quite well until i updated my packages.

I can't run it anymore because of dependency error : "ERROR: dependency 'transformr' is not available for package 'gganimate'".

It seems that the package does not exist anymore : https://cran.r-project.org/web/packages/available_packages_by_name.html (it is not listed on the CRAN)

Someone has a solution ?

Thanks in advance

You should still be able to install it from the GitHub repo

# install.packages("devtools")
devtools::install_github("thomasp85/transformr")
2 Likes

I tried downloading transformr as you suggested from GitHub in order to run gganimate but apparently, the available Rtools are incompatible?! I made sure to have downloaded the latest version.

See error message:

Downloading GitHub repo thomasp85/gganimate@master
from URL https://api.github.com/repos/thomasp85/gganimate/zipball/master
Installing gganimate
Downloading GitHub repo thomasp85/tweenr@master
from URL https://api.github.com/repos/thomasp85/tweenr/zipball/master
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installation failed: Could not find build tools necessary to build tweenr
Downloading GitHub repo thomasp85/transformr@master
from URL https://api.github.com/repos/thomasp85/transformr/zipball/master
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installation failed: Could not find build tools necessary to build transformr

I believe the Rtools incompatibility is between R 3.5 and Rtools. I'm not a Windows user, so I don't know much about it, but that's the impression I've gotten from others.

There is some problem with the Rtools as well.

It is a PATH and version problem, that appeared since R 3.5.

Here is the bug fix :

# Set path of Rtools
Sys.setenv(PATH = paste(Sys.getenv("PATH"), "*InstallDirectory*/Rtools/bin/",
                       "*InstallDirectory*/Rtools/mingw_64/bin", sep = ";")) #for 64 bit version
Sys.setenv(BINPREF = "*InstallDirectory*/Rtools/mingw_64/bin")
library(devtools)

#Manually "force" version to be accepted 
assignInNamespace("version_info", c(devtools:::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools")
find_rtools() # is TRUE now

# Now you can install transformr then gganimate
devtools::install_github("thomasp85/transformr")
devtools::install_github("dgrtwo/gganimate")

I hope it works for you.

7 Likes

I made an account just to thank you for posting this fix. Cheers!

5 Likes

Thanks, credit is not mine but I don't remember where I took it.

Thanks, @AntoineC, your code plus reinstalling Rtools finally solved the issue!

1 Like

A post was split to a new topic: Help with "Installation failed: Could not find build tools necessary to build transformr"

Hi I have tried your approach but it didn't resolve the issue for me. Can you please advise is there any other approach. I tried installing the Rtools multiple times and set the path as well.