10
votes

Our organization uses Sonatype Nexus to manage artifacts, whether they're internally-hosted stuff we've developed, or proxies to other repositories like Apache or similar. Most stuff is JAR-based.

My group does most of its work in R, and we're wondering whether it makes sense to 1) deploy our internal code as R packages in Nexus, and 2) create a proxy to a CRAN mirror in Nexus. I guess this would take some glue code, but I'm not very cozy with Nexus, so I'm not really sure what that would look like. Ideally it would let us install R packages by hitting Nexus directly, rather than downloading first & manually installing afterwards.

Anyone have suggestions or precedent?

3
Nexus will host any type of file. Problem is the proxy functionality is restricted to a small number of repository formats (Maven, NuGet, etc). Do you know the format of the CRAN repository? (I'm not familiar with it) - Mark O'Connor
It seems to be its own custom "format". Its artifacts are *.tar.gz or *.zip files, there's a directory structure, and an index file saying what's available in the repository. - Ken Williams
Yes, most repositories would have these features. Problem is compatibility... - Mark O'Connor

3 Answers

5
votes

Since NXRM 3.20.0 support for CRAN is offered in the default install thanks to Sonatype adopting the below mentioned community plugin.

For older NXRM release the Nexus Community has a plugin that adds support for CRAN repositories. You can find it on GitHub to install yourself.

1
votes

Nexus now natively supports R packages as of version 3.20

Check out the release notes: https://help.sonatype.com/repomanager3/formats/r-repositories#RRepositories-RRepositoryGroups

I was able to create R repo's with the same automation.

0
votes

How about placing your internal zipped package on an (internal only, if you like) URL that you can then point the devtools::install_url function to?