Ubuntu 16.04 LTS installation R and Rstudio Server

Source: Internet
Author: User

installation of 1.R1.1 First add mirror source
# ctrl+alt+/etc/apt/sources.list# After adding a new image source, a text box will automatically jump out and then enter the Deb HTTP in a similar place://  Cran.rstudio.com/bin/linux/ubuntu trusty/

The following methods can also be used to load a mirror source:

Deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu xenial/deb https://  <my.favorite.cran.mirror>/bin/linux/ubuntu wily/deb https://<my.favorite.cran.mirror >/bin/linux/ubuntu trusty/deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu precise/ in your/etc/apt/sources.list file, replacing by the actual URL of your favorite CRAN mirror. See https://

Save and exit after modification (file→quit)

1.2 running the command to download the public key
# Download Public key
$ sudo apt-key adv--keyserver keyserver.ubuntu.com--recv-keys 51716619e084dab9# then update $ sudo apt-get Update

1.3 Installing R
$ sudo apt-get Install R-base

Then verify that the installation was successful: Enter R at the terminal, and the information for R will be installed successfully.

1.4 Other

Some of the available packages are stored in Cran's Ubuntu warehouse, including:

    r-cran-boot    r-cran-class    R-cran-cluster    r-cran-codetools    R-cran-foreign    R-cran-kernsmooth    r-cran-lattice    R- cran-mass    r-cran-matrix    r-cran-MGCV    r-cran-Nlme    R -cran-nnet    r-cran-rpart    r-cran-spatial    r-cran-  Survival    R-cran-rodbc

To update the above package, you can use the following command (replace Foo):

$ sudo apt-get build-dep R-cran-foo

Installation of R package:

# Install package > install.packages () # Update package "/usr/local/lib/r/site-library")

2. Installing Rstudio2.1 Installation

First, go to download the installation files for your system: http://www.rstudio.com/products/rstudio/download/, and then perform the steps.

$ sudo apt-get install gdebi-core$ wget https://download2.rstudio.org/ Rstudio-server-0.99.902-amd64.deb$ sudo gdebi rstudio-server-0.99. 902-amd64.deb

2.2 Starting Rstudio server

Enter the address and port in the browser, such as:

http://192.168.43.129:8787http://localhost:8787

A user name and password will then appear, which is the same as the user and password used to log in to Ubuntu

After logging in, this is the following:

2.3 Installing Ggplot2 in Rstudio server

Before installing the Ggplot2 package, you need to install additional dependencies: ' Plyr ', ' Digest ', ' gtable ', ' reshape2 ', ' scales ', ' proto ', execute the following commands separately in the Rstudio command window :

Install.packages ('Plyr') Install.packages ('Digest') Install.packages ('gtable') Install.packages ('reshape2') Install.packages ('Scales') Install.packages ('Proto')

Then, install the GGPLOT2 package:

Install.packages ('ggplot2')

Reference:

https://www.rstudio.com/products/rstudio/download-server/

Ubuntu 16.04 LTS installation R and Rstudio Server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.