How to install the library R.utils in SWAN


how I could install a new R library as the basic one “R.utils”?

Error in install.packages(“R.utils”): unable to install packages

  1. install.packages(“R.utils”)
  2. stop(“unable to install packages”)


Hi Maria. I know very little of R, but the following works for me.

  • Open a terminal in SWAN
  • start R
    bash-4.2$ R
  • try to install R.utils and answer ‘yes’ to create a personal library
    > install.packages("R.utils")
    Warning in install.packages("R.utils") :
    'lib = "/cvmfs/"' is not writable
    Would you like to use a personal library instead? (yes/No/cancel) yes
    Would you like to create a personal library
    to install packages into? (yes/No/cancel) yes
  • Re-start the notebook and now you you should see the package
	Package	LibPath	Version	Priority	Depends	Imports	LinkingTo	Suggests	Enhances	License	License_is_FOSS	License_restricts_use	OS_type	MD5sum	NeedsCompilation	Built
R.methodsS3	R.methodsS3	/eos/home-m/mato/R/x86_64-pc-linux-gnu-library/3.5                                   	1.7.1   	NA         	R (>= 2.13.0)                           	utils                                                                                                                                   	NA	NA                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      	NA      	LGPL (>= 2.1)              	NA	NA	NA	NA	no	3.5.3
R.oo	R.oo       	/eos/home-m/mato/R/x86_64-pc-linux-gnu-library/3.5                                   	1.22.0  	NA         	R (>= 2.13.0), R.methodsS3 (>= 1.7.1)   	methods, utils                                                                                                                          	NA	tools                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   	NA      	LGPL (>= 2.1)              	NA	NA	NA	NA	no	3.5.3
R.utils	R.utils    	/eos/home-m/mato/R/x86_64-pc-linux-gnu-library/3.5                                   	2.9.0   	NA         	R (>= 2.14.0), R.oo (>= 1.22.0)         	methods, utils, tools, R.methodsS3 (>= 1.7.1)                                                                                           	NA	digest (>= 0.6.10)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      	NA      	LGPL (>= 2.1)              	NA	NA	NA	NA	no	3.5.3

Thanks Pere, it worked!