繁体   English   中英

RStudio 从 Azure DevOps 安装包

[英]RStudio install packages from Azure DevOps

我正在 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 包?

renv 能够从各种来源安装和恢复包,包括:

  • 起重机,
  • 生物导体,
  • GitHub
  • Gitlab
  • Bitbucket

但是,它不包括 Azure DevOps。 请参考这份文件 此外,在RStudio Documentation中也没有关于使用 Azure DevOps 存储库或包的信息。

我使用 remotes 包让它工作!

remotes::install_git("<clone url>", git = "external")

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM