2
library(devtools)
install_bitbucket("readlicor","remkoduursma")

工作正常!然而:

install_bitbucket("GasExchangeR","remkoduursma")

没有,它似乎在寻找:

bitbucket.org/remkoduursma/GasExchangeR/get/master.zip

但该页面不存在,而是:

bitbucket.org/remkoduursma/gasexchanger/get/master.zip

确实存在。

是否有解决方法(除了将我的所有包重命名为小写名称),还是这是一个错误?

谢谢雷姆科

4

1 回答 1

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进行此更改。

于 2012-10-19T02:51:38.340 回答