I'm creating some internal packages with R in RStudio. My repositories are hosted in Azure DevOps. I saw the renv.lock
and there is a section for repositories.
{
"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"
}
}
My components are in a url like
https://dev.azure.com/mycompany/RComponents/_git/mycomponent
Is there a way to add my private repositories in here? How can I install R packages from Azure DevOps?
renv is able to install and restore packages from a variety of sources, including:
However, it does not include Azure DevOps. Please refer to this document . In addition, there is also no information about using Azure DevOps repositories or packages in the RStudio Documentation .
I got it to work using the remotes package!
remotes::install_git("<clone url>", git = "external")
#AKA
remotes::install_git("https://ORG@dev.azure.com/USER/PROJECT/_git/NAME", git = "external")
You are then directed to a sign in handled via RStudio popups.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.