最近在使用devtools从github上下载R包时出现了版本冲突的问题,下面是一个小的解决方法
devtools::install_github("bmansfeld/QTLseqr")
Downloading GitHub repo bmansfeld/QTLseqr@master
from URL https://api.github.com/repos/bmansfeld/QTLseqr/zipball/master
WARNING: Rtools 3.5 found on the path at F:/Rtools is not compatible with R 3.5.1.
Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/, remove the incompatible version from your PATH.
Installation failed: Could not find build tools necessary to build QTLseqr
# Set path of Rtools, and *InstallDirectory* must substitute to you Rtools's directory
Sys.setenv(PATH = paste(Sys.getenv("PATH"), "*InstallDirectory*/Rtools/bin/", "*InstallDirectory*/Rtools/mingw_64/bin", sep = ";"))
#for 64 bit version, and *InstallDirectory* must substitute to you Rtools's directory
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::ins…