[英]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 能夠從各種來源安裝和恢復包,包括:
但是,它不包括 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.