Build the base R image with
$ singularity build r-base-latest.sif docker://r-baseThe two .def files can be used to rebuild that container image:
r-base-with-libraries.defadds additional libraries to the R in the imager-base-with-mount.defadds a directory for binding local data
Build these with:
singularity build --remote r-base-latest.sif r-base-with-libraries.def$ singularity exec my_r_container.sif Rscript ./list_installed.Rwill list the R libraries installed in the container