library(devtools)
install_bitbucket("readlicor","remkoduursma")
工作正常!但是:
install_bitbucket("GasExchangeR","remkoduursma")
没有,它似乎在寻找:
bitbucket.org/remkoduursma/GasExchangeR/get/master.zip
但该页面不存在,而是:
bitbucket.org/remkoduursma/gasexchanger/get/master.zip
确实存在。
是否有解决方法(除了将我的所有包重命名为小写名称),还是这个错误?
感谢 REMKO
答案 0 :(得分:2)
在等待devtools
中修复此问题的同时,如果这是repo
约定,您可以重新定义函数以将bitbucket
更改为全部小写。
install_bitbucket <- function (repo, username, ref = "master", branch = NULL, ...) {
if (!is.null(branch)) {
warning("'branch' is deprecated. In the future, please use 'ref' instead.")
ref <- branch
}
repo <- tolower(repo)
message("Installing bitbucket repo(s) ", paste(repo, ref,
sep = "/", collapse = ", "), " from ", paste(username,
collapse = ", "))
url <- paste("https://bitbucket.org/", username, "/", repo,
"/get/", ref, ".zip", sep = "")
install_url(url, paste(ref, ".zip", sep = ""), ...)
}
我已向devtools
发送pull request进行此更改。