From 35580d746f18819f355fbc1c1e0107b0e9a8656f Mon Sep 17 00:00:00 2001 From: Harald Wilhelmi Date: Tue, 27 Jul 2021 16:00:00 +0200 Subject: [PATCH] Fix and clarification for the R dependencies --- docs/Installation.rst | 8 ++++---- scripts/install_R_dependencies.R | 12 +++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/Installation.rst b/docs/Installation.rst index 934e37420..f1e54f98c 100644 --- a/docs/Installation.rst +++ b/docs/Installation.rst @@ -19,12 +19,12 @@ The default installation will install everything needed to run circtools *except .. code-block:: bash - pip3 install circtools --user # does not require root access, installation to local user directory + pip3 install circtools --user -.. code-block:: bash - - pip3 install circtools # will require root access and globally install circtools +Please note: +* The required R libraries will be installed in the default location in your home directory - unless you set enviromnet variable $R_LIBS_USER. +* In case want to install globally or into a dedicated 'venv' drop the --user option. Installation from GitHub -------------------------- diff --git a/scripts/install_R_dependencies.R b/scripts/install_R_dependencies.R index 7eaec8c2a..dc1d189f0 100755 --- a/scripts/install_R_dependencies.R +++ b/scripts/install_R_dependencies.R @@ -49,13 +49,15 @@ options(repos = c(CRAN = "https://cran.uni-muenster.de/")) # check if devtools is already installed pkgs <- pkgs[!pkgs %in% installed.packages()[,1]] -print("R minor version:") +minorVersion <- as.numeric(strsplit(version[['minor']], '')[[1]][[1]]) +majorVersion <- as.numeric(strsplit(version[['major']], '')[[1]][[1]]) -print(as.numeric(strsplit(version[['minor']], '')[[1]][[1]]) ) - -# new installer caller for R >3.6.0 -if (as.numeric(strsplit(version[['minor']], '')[[1]][[1]]) >= 6){ +print(paste("R version: ", majorVersion, ".", minorVersion, sep="")) +if ( + majorVersion >= 4 + || ( majorVersion == 3 && minorVersion >= 6 ) +){ if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")