RStudio从Azure DevOps安装包

5

我在RStudio中使用R创建一些内部包。我的存储库托管在Azure DevOps中,我看到了 renv.lock,其中有一个存储库的部分。

{
  "R": {
    "Version": "3.6.1",
    "Repositories": [
      {
        "Name": "CRAN",
        "URL": "https://cran.rstudio.com"
      }
    ]
  },
  "Packages": {
    "BH": {
      "Package": "BH",
      "Version": "1.69.0-1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Hash": "0fde015f5153e51df44981da0767f522"
    },
    "KernSmooth": {
      "Package": "KernSmooth",
      "Version": "2.23-16",
      "Source": "Repository",
      "Repository": "CRAN",
      "Hash": "a531dc333440009ee13bbb507232476d"
    }
}

我的组件以URL的形式存在,例如

https://dev.azure.com/mycompany/RComponents/_git/mycomponent

有没有办法将我的私有库添加进来?如何从Azure DevOps安装R包?


目前不支持此功能。您也可以在 https://github.com/rstudio/renv/issues 提交一个功能请求。 - Kevin Ushey
如果我的回复有帮助或指出了正确的方向,请考虑将其标记为答案,这也将有助于社区中的其他人。谢谢。 - Kevin Lu-MSFT
2个回答

4
我使用远程包使其正常工作了!
remotes::install_git("<clone url>", git = "external")

#AKA
remotes::install_git("https://ORG@dev.azure.com/USER/PROJECT/_git/NAME", git = "external")

然后您将被引导到通过RStudio弹出窗口处理的登录界面。


我也可以。 - undefined

1

renv能够从多种来源安装和还原软件包,包括:

  • CRAN,
  • Bioconductor,
  • GitHub
  • Gitlab
  • Bitbucket

然而,它不包括Azure DevOps。请参考this document。另外,在RStudio Documentation中也没有使用Azure DevOps存储库或软件包的信息。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接