Done with no results; hangs while 'retrieving package installation context'
Security colleagues here would like to discuss the possibility of creating a mirror with someone at Posit: may I give your contact or there is someone else I could ask them to address their questions?
Mirroring will simplify the end-user process. Here's how to do it from the official sources, from what I've found:
Direct mirroring of CRAN
Mirroring the Comprehensive R Archive Network (CRAN) repository is a process that requires significant storage space and bandwidth, as it involves copying the entire CRAN repository, which is quite large. Institutions typically do this to provide local access to CRAN packages, ensuring faster downloads and reducing the load on the main CRAN servers. The process generally involves the following steps:
Check CRAN's Mirror Policy: Before setting up a mirror, read CRAN's policy for mirroring to ensure compliance with their guidelines. This policy can be found on the CRAN website. For public-facing mirrors, the policy is for no more than two mirrors per country. I don't know if that also applies to private mirrors.
Ensure Sufficient Resources: Make sure you have enough disk space and bandwidth. A full CRAN mirror requires over 250 GB of storage space, and this requirement is steadily growing.
Set Up a Web Server: You need a web server to host the mirror. Common choices include Apache and Nginx.
Choose Mirroring Software: You will need software to mirror the repository. rsync is commonly used for this purpose. It is a utility for efficiently transferring and synchronizing files across computer systems.
Configure Regular Updates: CRAN is updated regularly, so your mirror should be too. Set up a cron job or similar scheduled task to run rsync periodically (daily or more frequently) to keep your mirror up to date.
Register Your Mirror with CRAN: Once your mirror is operational, you should register it with CRAN. This usually involves sending an email with details about your mirror.
Here's a basic example of how to set up an rsync script for mirroring CRAN:
The -rtlzv flags are for recursion, times, links, compression, and verbosity.
--delete will delete files in your mirror that are no longer present on CRAN.
cran.r-project.org::CRAN is the source CRAN mirror.
/path/to/local/mirror is the path where you want to store the mirror on your local server.
Important: Always check with CRAN and the latest guidelines on their website for any updates or changes to the mirroring process, and make sure you have the necessary permissions and resources to maintain a CRAN mirror.
There is similar process for bioconductor.org for its separately administered repository of packages developed for use in the life sciences. They expressly permit private-facing mirrors.
Posit/RStudio offers mirroring as part of its commercial package manager. I believe the charge is US$1000/year. It has the added advantage of being a repository of Python packages.
I'm not affiliated with Posit/RStudio, but if you have trouble reaching someone, I have contacts who will be able to provide direction.