R Install Linux

# add the relevant GPG ke
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

# add the repository
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

# run update
sudo apt update

# install R
sudo apt install r-base

# start R as root: install an example package for every user on the system
sudo -i R

# Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help.

# Type 'q()' to quit R.
# will first need to install the r-base package
sudo apt update
sudo apt -y install r-base

# The easiest way to install DEB file on Ubuntu Linux is by using the gdebi command. In case gdebi is not available on your system you can install it by executing the bellow command:
$ sudo apt install gdebi-core

# Download RStudio
    # Next, navigate your browser to the official RStudio download page and download the latest Ubuntu/Debian RStudio *.deb package available.

# Install RStudio on Ubuntu
sudo gdebi rstudio-xenial-1.1.442-amd64.deb

# start RStudio
rstudio

# Alternatively, search your start menu and start RStudio by clicking on its icon
$ gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
$ gpg -a --export E084DAB9 | sudo apt-key add -
  • 安裝 "devtools" 卻一直失敗
    • 最後多安裝一些東西就順利完成了
sudo apt-get install libxml2-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install curl
sudo apt-get install libssl-dev

Reference:

results matching ""

    No results matching ""