INSTALL R AND RSTUDIO IN UBUNTU 12.04 AND HIGHER

October 25, 2016
By

(This article was first published on R – Greetz to Geeks, and kindly contributed to R-bloggers)

RStudio requires R to be installed in the system.

But before you start installing R, you need to add the CRAN repository to get the latest version of R. For that, you can add an entry like the one shown below based on your Ubuntu version.

I am using Ubuntu 14.04 LTS (Trusty Tahr), so my entry will be like,

deb /bin/linux/ubuntu" rel="nofollow">https:///bin/linux/ubuntu trusty/

Now you have to add one more thing to the above entry. The CRAN mirror you wish to use.

You can choose your favorite CRAN mirrors from https://cran.r-project.org/mirrors.html

I am adding University of California, Berkeley, CA as my CRAN mirror.

Now, open the terminal (Ctrl+Alt+T) and enter your entry based on your ubuntu version and CRAN mirror.

deb https://cran.cnr.berkeley.edu/bin/linux/ubuntu trusty/

Update the packages,
sudo apt-get update

Now we can install R packages
sudo apt-get install r-base

Once the above installations are done, you are ready to install RStudio
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-0.99.903-amd64.deb
sudo gdebi rstudio-server-0.99.903-amd64.deb

Access RStudio using the web browser,
http:// Address>:
eg:
http://192.168.150.138:8787

Note: You can check your IP address using ifconfig. The default port number will be 8787.
The username and password will be same as that of your system.

To leave a comment for the author, please follow the link and comment on their blog: R – Greetz to Geeks.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)