
R Packages To Library Mac OS System
Before we start talking about installing packages, it would be better to do some basic configuration relating to the R library. Note: I mainly work under CentOS and Windows environment, so, I am not familiar with Mac OS system. Purpose in short: to ease the pain when installing/updating R and R packages.
Installing package (s) into D:/R/library (as lib is unspecified). Installing PackagesIn RStudio, you can set the mirror by choosing ToolsOptions. Instead you will be able to install and maintain the packages you require for your project yourself. Generally, the first time a package is installed, R will want to know which CRAN Mirror you want to use.Unfortunately, the HPC staff will no longer be able to maintain a complete set of R packages globally.
...
This example installs the rjags package:Export PKG_CONFIG_PATH=/packages/jags/4.3.0/lib/pkgconfigInstall.packages(c(‘rjags’),repos = “”, configure.args=”––enable-rpath”)As always, please don’t hesitate to contact us if you need further assistance with R package installation. For example, to install the rzmq package, you’d need the zeromq module loaded before starting R and you’d need to specify the include and library paths like this:Install.packages(c(‘rzmq’),repos = “”, configure.vars=”INCLUDE_DIR=/packages/zeromq/3.2.5/include LIB_DIR=/packages/zeromq/3.2.5/lib”)Finally, you can use package config for packages that want it, as well. Installing From GitHubTo install packages from GitHub sites, you can do something like:Install_github(“package1”) Advanced ConfigurationsFor more complex installations that require other specific libraries, you can specify configure.vars to specify include and library paths.
