I have to use a R/studio on a secure server that is MFA and once in cannot access internet. I will have to provide (package) files to an admin role, and then manually transfer files in/out.
I would envisage creating on my regular PC the R project, with renv that I want to recreate, and then work out what files to transfer. Is there documentation to work out what files/folders I have to include to make renv work as desired here. The R installation on the secure server is just the base packages with R4.3.2.
Thanks Simon
I am not sure if this is the right approach (i.e. to transfer files in and out - why would your company build a secure server but then still allow files being transferred in - admittedly in a more controlled way however). While I don't know more about your general setup, I can imagine the following approaches that would help solve the issue on a larger scale.
- Pre-install a list of "approved" packages on the secure server in a so-called
site-library
so that all users can only consume these packages and their respective version. This is typically done by the admins following a general agreement between business and IT folks on the list of packages and versions to be installed.
- Consider the setup of a hosted version of Posit Package Manager that would allow any user in the secure environment to download packages on-demand (you again could limit the number of packages available but would not need to pre-install packages as above).
If you really want to do neither of the above and still want to transfer files, the best chances of success you will have if you identify all needed source R packages, build a CRAN repository with all the needed packages (you can build this via the miniCRAN
R package, for example), transfer the repository with all files over and then install the packages from there using renv::restore()
.
Further simplifications may be possible (e.g. if you were to use the same R version and operating system version) but this would need more information from your side on your particular setup.
Thanks. I think the miniCRAN approach may well work as I need.
1 Like