Thursday, July 20, 2017

Updating version of R in ubuntu

Dear Technocrats,

This post is for R/Rstudio programmers. As we all know that Rstudio is a package based framework. Many new packages are not supported by older version of R. So in this post I am explaining the procedure to update version of R in your system.

I was having R 3.2.x in my Ubuntu Machine,



and I am showing step by step procedure to update the R version to 3.4.x.

(Note: As we know that R is already installed in our system so it needs to be upgraded. For this we need to mention its online repository path in /etc/apt/sources.list file as shown below:

Now save this and run sudo apt-get update command. It may throw an error as shown below:



To solve this problem you need to authenticate public key by these two commands


After this run the commands

sudo apt-get update
sudo apt-get upgrade r-base

you will get your updated version of R on your Ubuntu Machine as shown.


Hope this post will be helpful. For more updates keep visiting the blog.


Wednesday, July 19, 2017

Installation of R in Ubuntu

Dear Technocrates,

Now a days R is getting more and more focus due to its ease of use for implementation of machine learning algorithms on large data analysis projects and for data visualization.

In this post I am giving steps to install R and Rstudio in your Ubuntu Machine. Installation of R/Rstudtio in ubuntu is just 3 steps procedure.

1. sudo apt-get update
2. sudo apt-get install r-base

These commands will install available version of R in your machine. You can check the version of R by type the command R on your terminal. To come out of terminal just type

quit();

It will ask to save or not to save your workspace as per your choice just come out of the terminal.
To install the R studio now download the rstudio-1.0.143-amd64.deb in your system and just give the command sudo gdebi rstudio-1.0.143-amd64.deb . Ensure that you are in the same directory in which debian file is downloaded or you have given the right path to that file.
Note: if gdebi is not installed in you system just install it first by simple command:
sudo apt-get install gdebi

You are done. just type rstudio in your terminal as shown:



you will have the rstudio GUI interface in your system as shown below.


Now you can play with features of R on this Rstudio interface. For more updates of programming with R keep visiting the blog.

Rstudio is a package based programming framework. You just install the packages form right side window packages and install option. just type the package you need to install and it will be installed with no efforts.

Most of the packages will be installed simply. But a few new packages may throw error. It is due to version of R. If you have some older version of R installed on your machine there is no escape plan to install new packages in Rstudio other than upgrading your R version.

How to upgrade R in Ubuntu
Upgrading R version in Ubuntu is tricky procedure. Visit this post to find the steps to upgrade R version in Ubuntu machine.