Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

Installing a new R release and a bundle of default user packages is streamlined with some scripts. This text is for administrators of the R installation. Other users may find some hints here, if their installation to $HOME fails.

Installing R

  • Make a new directory. It is strongly suggested, to follow the template form /sw/viz/R/R-4.0.2/skl. Copy the installation scripts into this directory. Do not forget, other members of the sw-group may need to install here too.

    Codeblock
    $ cd /sw/viz/R/R-4.0.2/skl
    $ cp ../../scripts/* .
    $ chmod g+rwX *
    


  • Edit the script getR and update the version number. Run getR. This downloads the requested version of R, inflates und unpacks the tar-file and renames the source directory into build. Note, if you download otherwise, please rename the R-directory into build, if you want to use the script install_R.

    Codeblock
    $ ./get_R
    


  • Check or edit the script install_R. You may change there:
    • the default compiler to be used for building R and R packages. This compiler needs to be compatible with the compiler used for external packages like netcdf, openmpi, magick etc. If you change the default compiler, please change the other scripts too - see below.
    • the options for running configure
    • compiler options, especially the degreee of optimisation and rpath. These options will be part of the default settings to be used by Rscript when building packages.
  • Run install_R. The script will stop several time times requesting ENTER to continue. This helps to see, if the configureationconfiguration, compilation and all checks are finished with reasonable output. Note, the script changes permissions in the end, to allow other members of the sw-group to install there too.

...

  • Produce a module file. It should be sufficient, to copy that of the previous version and to the new version number and change the version number in the file.

...

Before a package is installed, the correct compiler module must be loaded. Otherwise the system compiler is used. Since c++ is used a lot, this may result in an inconsistent package library. Package installation may be done with the help of Rscript or directly from R or rstudio. We recommend to use our scripts instead, since

  • they load the default compiler compatible with R
  • contain some fixes and workarounds needed to install some packages
  • set the permissions for the installed files, which is often forgotten
  • help with bookkeeping of package lists.

We support three different repositories:

cran (https://cran.uni-muenster.de/): the main repository for releases of R packages

github: the detailed search for the package is done with githubinstall used by R.

BiocManager (https://www.bioconductor.org/install): a specific repository providing tools for the analysis and comprehension of high-throughput genomic data.