Respecting custom repositories files in interactive/batch R sessions
I may be missing something here but aren't you overcomplicating things? One can avoid the repetitive dialog by setting options(repos) accordingly, and I have long done so. The Debian (and hence Ubuntu and other derivatives) package does so via the Rprofile.site I ship. See e.g. here https://sources.debian.org/src/r-base/4.2.1-2/debian/Rprofile.site/ I have used the same mechanism to point to intra-company repositories, easily a decade or so ago. I had no problems with R CMD check of in-house packages using this. Dirk
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org