Open the terminal (Ctrl + Alt + T) and give the following
commands: sudo gedit /etc/apt/sources.list Whenever prompted for password, enter mnnit Append the below line at end of the file which is opened: deb http://cran.rstudio.com/bin/linux/ubuntu trusty/ deb http://cz.archive.ubuntu.com/ubuntu xenial main universe Save the file and close it Give the following commands on terminal to install R: sudo apt-get update sudo apt-get install r-base
DAMLR@CSED, MNNIT Allahabad
RStudio Installation
DAMLR@CSED, MNNIT Allahabad
RStudio Installation Steps 6
Check rstudio-1.0.143-amd64.deb file at your home
location. If not, download RStudio from http://172.31.134.27 and paste it at Home location i.e. /home/mnnit Type the following command in terminal to install RStudio and its required libraries: sudo apt-get install libgstreamer0.10-0 sudo apt-get install libgstreamer-plugins-base0.10-0 sudo apt-get install gdebi-core sudo apt-get install libjpeg62 sudo dpkg -i rstudio-1.0.143-amd64.deb DAMLR@CSED, MNNIT Allahabad Required Packages Installation
DAMLR@CSED, MNNIT Allahabad
Package Installation Steps 8
The virtual machine labeled mnnit is for learning
installation process, which can be shut down now. Now select OS damlr to boot the virtual machine.
Select user damlr and enter password damlr
Open already installed RStudio on the virtual machine.
On RStudio, goto ToolsGlobal Options Packages
and Uncheck below option: Use secure download method for HTTP Close and exit from the RStudio DAMLR@CSED, MNNIT Allahabad Package Installation Steps Contd 9
Re-open RStudio and type the following command in R
console to bypass proxy: Sys.setenv(http_proxy="edcguest:edcguest@172.31.100.14:31 28") Goto Tools Install Packages... Type the name of package to be installed in the
opened dialog box
For list of packages to be installed, please refer next two slides DAMLR@CSED, MNNIT Allahabad R Packages 10
R has lot of packages install as per need
For DAMLR-2017, the following packages are required: dplyr A grammar of data manipulation ggplot2 Create elegant Data Visualization using the grammar of graphics mice Takes care of missing values rpart Recursive Partitioning and Regression trees caret Used for classification and regression training randomForest Used for Random Forest technique class Functions for classification lubridate Make dealing with dates a little easier
DAMLR@CSED, MNNIT Allahabad
R Packages Contd 11
nnet Used for Neural Network techniques
neuralnet Training of Neural Networks e1071 Used for Support Vector Machine (SVM) technique and other statistical techniques like Nave Bayes kernlab Used for Kernel based machine learning techniques ISLR Data for An Introduction to Statistical Learning with Applications in R genalg R based genetic algorithm lpSolve Interface to LP_solve v 5.5 to solve Linear/Integer Programs lpSolveAPI R Interface to Ip_solve version 5.5.2.0 tm Text Mining Package wordcloud Word clouds DAMLR@CSED, MNNIT Allahabad Other Settings
DAMLR@CSED, MNNIT Allahabad
Other Settings 13
We have install R, RStudio and required Packages
After installation is complete, R and RStudio can be accessed through the search icon on top left corner of screen For e.g., to open RStudio type RStudio on Search bar An icon with caption RStudio will appear, select it to open RStudio To avoid searching from next time, choose the option Lock to Launcher, by right clicking on the icon of opened RStudio tool on task bar
DAMLR@CSED, MNNIT Allahabad
Other Settings Contd 14
For effective working we recommend you to create
three folders under ~/R Code to store the code written by you Data to store the used datasets Figures to store the plotted graphs and other figures To work in a particular directory, we can set the working directory from SessionSet Working Directory Same can be done through command on R console: setwd(~/R/Data) DAMLR@CSED, MNNIT Allahabad All the Best Happy Learning