https://github.com/INWTlab/r-config
R installation and configuration. We have moved this configuration into ansible. This repo is no longer maintained.
https://github.com/INWTlab/r-config
Last synced: 4 months ago
JSON representation
R installation and configuration. We have moved this configuration into ansible. This repo is no longer maintained.
- Host: GitHub
- URL: https://github.com/INWTlab/r-config
- Owner: INWTlab
- Archived: true
- Created: 2018-08-10T13:36:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-03T15:29:29.000Z (about 4 years ago)
- Last Synced: 2024-08-13T07:16:07.463Z (8 months ago)
- Language: Shell
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - INWTlab/r-config - R installation and configuration. We have moved this configuration into ansible. This repo is no longer maintained. (Shell)
README
## Install specific R version in Ubuntu
### Install R in your preferred version:
```
sudo bash bionic/install-r.sh
```### Set additional default repositories
```
export REPO=
sudo bash set-repo.sh
```### Install R package
```
sudo bash install-pkg.sh
```### Install all R packages from repo
```
export REPO=
sudo bash install-repo.sh
```### Uninstall all R packages from repo
```
export REPO=
sudo bash uninstall-repo.sh
```## Example
To install R in version 3.5.1 and 3.5.2 on one system, you can run:
```
sudo bash bionic/install-r.sh 3.5.1 2018-08-31
sudo bash bionic/install-r.sh 3.5.2 2019-03-10
# set repository
export REPO=
sudo bash set-repo.sh 3.5.1
sudo bash set-repo.sh 3.5.2
# install packages
sudo bash install-pkg.sh 3.5.1 tidyverse
sudo bash install-pkg.sh 3.5.2 tidyverse
# install repositories
sudo bash install-repo.sh 3.5.1
sudo bash install-repo.sh 3.5.2
```Now you have a 'base' stack of R packages for all your users installed. The
command `R` is bound to the latest version you installed. A specific version can
be launched using:```
R -e 'sessionInfo()'
R-3.5.1 -e 'sessionInfo()'
R-3.5.2 -e 'sessionInfo()'
```## Gotchas
`bionic/install-r.sh` assumes that the local installation of apt has the source
repositories for r-base activated. If this is not the case, e.g. in a fresh
installation of a server ubuntu, you may add the following lines to the
configuration:```
sudo su -c "echo 'deb-src http://de.archive.ubuntu.com/ubuntu/ bionic universe
deb-src http://de.archive.ubuntu.com/ubuntu/ bionic-updates universe' > /etc/apt/sources.list.d/r-sources.list"
sudo apt update
```and remove it with
```
sudo rm /etc/apt/sources.list.d/r-sources.list
sudo apt clean
sudo apt update
```