R Package Installer for Command Line Interface
| R | clir |
|---|---|
| ≥ 3.5 | ≥ v1.1.0 |
| < 3.5 | < v1.0.8 |
Install packages via CRAN using install.packages().
$ clir install foreach doParallel tidyverse
Install or update packages via CRAN using devtools::install_cran().
$ clir install --devt=cran foreach doParallel tidyverse
Install or update packages via GitHub using devtools::install_github().
$ clir install --devt=github IRkernel/IRkernel
Install or update packages via Bioconductor using BiocManager::install().
$ clir install --bioc GenomicRanges
Install or update packages via Bioconductor using devtools::install_bioc().
$ clir install --devt=bioc GenomicRanges
Update packages via CRAN using update.packages().
$ clir update
Validate loading of installed packages.
$ clir validate foreach doParallel tidyverse
Load packages and print session information.
$ clir session foreach doParallel tidyverse
Run clir --help for information.
The image is available at Docker Hub.
$ docker image pull dceoy/clir
Install R and the additional packages.
# Ubuntu
$ sudo apt-get -y install git libcurl4-gnutls-dev libssl-dev libxml2-dev r-base
# CentOS
$ sudo yum -y install git libcurl-devel libxml2-devel openssl-devel R-devel
# Fedora
$ sudo dnf -y install git libcurl-devel libxml2-devel openssl-devel R-devel
# macOS with Homebrew
$ brew tap homebrew/science
$ brew install curl git openssl r
Check out clir and run install_clir.sh.
$ git clone https://github.com/dceoy/clir.git ~/.clir
Install clir and the dependencies.
$ ~/.clir/install_clir.sh
install_clir.sh installs the following R packages:
clir depends on docopt and yaml, and uses devtools, drat, and BiocManager additionally if they are available.
Run ~/.clir/install_clir.sh --help for more details of the installer.
Set ~/.clir/bin into ${PATH} and set ~/.clir/r/library into ${R_LIBS_USER} or ${R_LIBS}.
$ echo 'export PATH="${HOME}/.clir/bin:${PATH}"' >> ~/.bash_profile
$ echo 'export R_LIBS_USER="${HOME}/.clir/r/library"' >> ~/.bash_profile
$ source ~/.bash_profile
If you use Zsh, modify ~/.zshrc instead of ~/.bash_profile.
Run the installer with --root if you install clir into a system. (clir is going to be installed into /usr/local then.)
$ curl -LSO https://raw.githubusercontent.com/dceoy/clir/master/install_clir.sh
$ chmod +x install_clir.sh
yy$ sudo ./install_clir.sh --root
$ rm install_clir.sh
$ ~/.clir/install_clir.sh
$ sudo /usr/local/src/clir/install_clir.sh --root
Library path
R packages are installed into a directory in ${R_LIBS_USER} nor ${R_LIBS}.
If neither of them is set, a default library path is used.
The default path can be checked as follows:
$ R --slave -e '.libPaths()[1]'
CRAN and Drat repositories
clir saves URLs of CRAN mirrors and Drat repositories into ~/.clir/r/clir.yml as a YAML file.
Content type
Image
Digest
sha256:e13f67909…
Size
268.1 MB
Last updated
about 2 months ago
docker pull dceoy/clir