SlideShare a Scribd company logo
R Programming
Sakthi Dasan Sekar
http://shakthydoss.com 1
Introduction to R
R is a programming language developed as an alternative for S
language at AT&T Bell Laboratories by Robert Gentleman and Ross
Ihaka.
Due to its underlying philosophy and design R is incredibly excel in
statistical computation and graphic visualization.
R is free, open source with a very high activity community members.
Available cross all platforms (Linux, Mac, Windows)
http://shakthydoss.com 2
Introduction to R
R is much more than just its core language. It has a worldwide
repository system, the Comprehensive R Archive Network (CRAN)
http://cran.r-project.org
As of 2011, there were more than 3,000 such packages hosted on CRAN
and numerous more on other sites
http://shakthydoss.com 3
Introduction to R
Cons of R Language
R has a steep learning curve.
Working with large datasets is limited by RAM size.
http://shakthydoss.com 4
Introduction to R
Who use R in their business
http://shakthydoss.com 5
Introduction to R
Understanding of R language
• R Statement or Commands can be separated by a semicolon (;) or a newline.
• Assignment operator in R is "<-" (although "=" also works).
• All characters after # are treated as comments.
• There is not multi line or block level Comments.
• $ (dollar) operator in R is an analogous to .(dot) operator in other languages.
Student$name
Student$age
http://shakthydoss.com 6
Introduction to R
Installing R
Installing from CRAN (Comprehensive R Network)
Website: http://cran.r-project.org/
R is actively being improved all the time, Make sure that you choose
recent version to install.
http://shakthydoss.com 7
Introduction to R
Installing R in windows
For Windows and Mac OS X, one can simply download a self-installing binary.
For Linux, installation varies.
For the Debian distribution (including Ubuntu), R system can be installed using the regular
package-management tools.
Since R is open source, one can also compile and install it using the source code.
http://shakthydoss.com 8
Introduction to R
Installing R in windows
Window R package can be downloaded from
https://cran.r-project.org/bin/windows/base/
Download R 3.X.X for Windows executable file (.exe)
http://shakthydoss.com 9
Introduction to R
Click Next in the Setup Wizard.
You can leave to setting to default.
http://shakthydoss.com 10
Introduction to R
Open R Console (Rgui from your desktop) R Console
http://shakthydoss.com 11
Introduction to R
IDE for R
The RStudio project currently provides most of the desired features for
an IDE in a novel way, making it easier and more productive to use R.
The RStudio program can be run on the desktop or through a web
browser.
The desktop version is available for Windows, Mac OS X, and Linux
platforms.
http://shakthydoss.com 12
Introduction to R
Notable IDEs for R
Name Platforms
ESS Windows, Mac, Linux
Eclipse Windows, Mac, Linux
SciViews Windows, Mac, Linux
JGR Windows, Mac, Linux
Tinn-R Windows
Notepad++ Windows
Rgui Windows
http://shakthydoss.com 13
Introduction to R
Installing RStudio is usually a straightforward process.
For Windows and Mac OS X, one can simply download a self-installing binary.
For Linux, installation varies.
For the Debian distribution (including Ubuntu), RStudio can be installed using
the regular package-management tools.
http://shakthydoss.com 14
Introduction to R
Installing RStudio in windows.
https://www.rstudio.com/products/rstudio/download/
Download Rstudio.
Run the installation file.
http://shakthydoss.com 15
Introduction to R
Open RStudio
Source Panel
R console
Environment
Panel
File/Package
Panel
http://shakthydoss.com 16
Introduction to R
R workspace
When R is started, it follows this process
R is started in the working directory (aka workspace).
If present, the .Rprofile file’s commands are executed.
If present, the .Rdata file is loaded.
http://shakthydoss.com 17
Introduction to R
R workspace
R stores user-defined objects in workspace.
At the end of an R session, the user can save an snapshot of the current
workspace and reloaded automatically next time when R is started.
getwd() - return working directory
setwd() - set working directory
http://shakthydoss.com 18
Introduction to R
In RStudio you can set the workspace by Tools -> Global Options
http://shakthydoss.com 19
Introduction to R
• There are over 1,000 functions at the core of R, and new R functions are created all of the time.
• Each R function comes with its own help page, which you can access by typing the function’s name after
question mark
Getting Help
help.start() # Load HTML help pages into browser
help(package) # List help page for "package"
?package # Shortform for "help(package)"
help.search("keyword") # Search help pages for "keyword"
?help # For more options
help(package=base) # List tasks in package "base"
http://shakthydoss.com 20
Introduction to R
Packages
• Many Data Scientist programmers and statisticians , use R to design tools that can help people analyze data. Many of these
people contribute their code as preassembled collections of functions and objects called packages.
• Each R package is hosted at http://cran.r-project.org
• Not all packages are loaded by default, but can be load / install on demand
library() # List available packages to load
library("package") # loads the package
library(help="package") # list package contents
detach("package:pkg") # Unload the loaded package "pkg"
install.packages(“package") # Install the package
http://shakthydoss.com 21
Introduction to R
Installing package by GUI RStudio -> Tools -> Install Packages
Check the package to load
http://shakthydoss.com 22
Introduction to R
Knowledge Check
http://shakthydoss.com 23
Introduction to R
Which of the statement is TRUE.
A. R is a propitiatory general purpose language
B. R excels in statically computation and graphic capabilities.
C. R syntax are very similar to assembly language.
D. R has no GUI
Answer B
http://shakthydoss.com 24
Introduction to R
Which of the statement is TRUE.
A. Working with large datasets is limited by RAM size.
B. R language is own by AT&T Bell Labs
C. R available only for Unix platfroms
D. R language is design for parallel programming and horizontally scalable systems.
Answer A
http://shakthydoss.com 25
Introduction to R
What is CRAN stands for
A. Comprehensive R Network
B. Computational R Network
C. Comprehensive R Archive Network
D. Computational R Archive Network
Answer C
http://shakthydoss.com 26
Introduction to R
Which not an IDE for R language
A. RStudio
B. RGUI
C. Tinn-R
D. Dreamweaver
Answer D
http://shakthydoss.com 27
Introduction to R
When R is started.
A. It loads .Rprofile and .Rdata from workspace
B. It attempts loads only .Rdata from workspace
C. It attempts loads only .Rprofile from workspace
D. Does nothing
Answer A
http://shakthydoss.com 28
Introduction to R
Function getwd() - return working directory
A. TRUE
B. FALSE
Answer A
http://shakthydoss.com 29
Introduction to R
Function setwd() - set working directory
A. TRUE
B. FALSE
Answer A
http://shakthydoss.com 30
Introduction to R
How to browser for all help documents in R
A. help.start()
B. help(help)
C. library()
D. install.packages(help)
Answer A
http://shakthydoss.com 31
Introduction to R
How to install new packages in R.
A. Install(“package”)
B. library(“package”)
C. install.packages("package")
D. load(“package”)
Answer C
http://shakthydoss.com 32
Introduction to R
How to load a installed package.
A. load("package")
B. library("package")
C. install.packages("package")
D. library()
Answer B
http://shakthydoss.com 33

More Related Content

What's hot

Introduction to R - from Rstudio to ggplot
Introduction to R - from Rstudio to ggplotIntroduction to R - from Rstudio to ggplot
Introduction to R - from Rstudio to ggplot
Olga Scrivner
 
Unit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxUnit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptx
Malla Reddy University
 
Python pandas Library
Python pandas LibraryPython pandas Library
Python pandas Library
Md. Sohag Miah
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Edureka!
 
Visualization and Matplotlib using Python.pptx
Visualization and Matplotlib using Python.pptxVisualization and Matplotlib using Python.pptx
Visualization and Matplotlib using Python.pptx
SharmilaMore5
 
Machine learning ( Part 2 )
Machine learning ( Part 2 )Machine learning ( Part 2 )
Machine learning ( Part 2 )
Sunil OS
 
What are Hadoop Components? Hadoop Ecosystem and Architecture | Edureka
What are Hadoop Components? Hadoop Ecosystem and Architecture | EdurekaWhat are Hadoop Components? Hadoop Ecosystem and Architecture | Edureka
What are Hadoop Components? Hadoop Ecosystem and Architecture | Edureka
Edureka!
 
Introduction to R programming
Introduction to R programmingIntroduction to R programming
Introduction to R programming
Victor Ordu
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
 
Begin with Python
Begin with PythonBegin with Python
Begin with Python
Narong Intiruk
 
Python Programming Essentials - M23 - datetime module
Python Programming Essentials - M23 - datetime modulePython Programming Essentials - M23 - datetime module
Python Programming Essentials - M23 - datetime module
P3 InfoTech Solutions Pvt. Ltd.
 
Data visualization in Python
Data visualization in PythonData visualization in Python
Data visualization in Python
Marc Garcia
 
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Philip Schwarz
 
Scala Intro
Scala IntroScala Intro
Regular expressions in Python
Regular expressions in PythonRegular expressions in Python
Regular expressions in Python
Sujith Kumar
 
Data Analysis and Programming in R
Data Analysis and Programming in RData Analysis and Programming in R
Data Analysis and Programming in REshwar Sai
 
DJango
DJangoDJango
DJango
Sunil OS
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
Mohamed Alrshah
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
Paige Bailey
 

What's hot (20)

Introduction to R - from Rstudio to ggplot
Introduction to R - from Rstudio to ggplotIntroduction to R - from Rstudio to ggplot
Introduction to R - from Rstudio to ggplot
 
Unit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxUnit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptx
 
Pandas
PandasPandas
Pandas
 
Python pandas Library
Python pandas LibraryPython pandas Library
Python pandas Library
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
 
Visualization and Matplotlib using Python.pptx
Visualization and Matplotlib using Python.pptxVisualization and Matplotlib using Python.pptx
Visualization and Matplotlib using Python.pptx
 
Machine learning ( Part 2 )
Machine learning ( Part 2 )Machine learning ( Part 2 )
Machine learning ( Part 2 )
 
What are Hadoop Components? Hadoop Ecosystem and Architecture | Edureka
What are Hadoop Components? Hadoop Ecosystem and Architecture | EdurekaWhat are Hadoop Components? Hadoop Ecosystem and Architecture | Edureka
What are Hadoop Components? Hadoop Ecosystem and Architecture | Edureka
 
Introduction to R programming
Introduction to R programmingIntroduction to R programming
Introduction to R programming
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
 
Begin with Python
Begin with PythonBegin with Python
Begin with Python
 
Python Programming Essentials - M23 - datetime module
Python Programming Essentials - M23 - datetime modulePython Programming Essentials - M23 - datetime module
Python Programming Essentials - M23 - datetime module
 
Data visualization in Python
Data visualization in PythonData visualization in Python
Data visualization in Python
 
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
 
Scala Intro
Scala IntroScala Intro
Scala Intro
 
Regular expressions in Python
Regular expressions in PythonRegular expressions in Python
Regular expressions in Python
 
Data Analysis and Programming in R
Data Analysis and Programming in RData Analysis and Programming in R
Data Analysis and Programming in R
 
DJango
DJangoDJango
DJango
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
 

Viewers also liked

R tutorial
R tutorialR tutorial
R tutorial
Richard Vidgen
 
R language tutorial
R language tutorialR language tutorial
R language tutorial
David Chiu
 
R programming Basic & Advanced
R programming Basic & AdvancedR programming Basic & Advanced
R programming Basic & Advanced
Sohom Ghosh
 
Using R For Statistics
Using R For StatisticsUsing R For Statistics
R Introduction
R IntroductionR Introduction
R Introductionschamber
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
Samuel Bosch
 
Bayesian models in r
Bayesian models in rBayesian models in r
Bayesian models in r
Vivian S. Zhang
 
Presentation R basic teaching module
Presentation R basic teaching modulePresentation R basic teaching module
Presentation R basic teaching module
Sander Timmer
 
Data Science Academy Student Demo day--Divyanka Sharma, Businesses in nyc
Data Science Academy Student Demo day--Divyanka Sharma, Businesses in nycData Science Academy Student Demo day--Divyanka Sharma, Businesses in nyc
Data Science Academy Student Demo day--Divyanka Sharma, Businesses in nyc
Vivian S. Zhang
 
Introduction to the R Statistical Computing Environment
Introduction to the R Statistical Computing EnvironmentIntroduction to the R Statistical Computing Environment
Introduction to the R Statistical Computing Environment
izahn
 
Introduction to R for Data Science :: Session 7 [Multiple Linear Regression i...
Introduction to R for Data Science :: Session 7 [Multiple Linear Regression i...Introduction to R for Data Science :: Session 7 [Multiple Linear Regression i...
Introduction to R for Data Science :: Session 7 [Multiple Linear Regression i...
Goran S. Milovanovic
 
R- Introduction
R- IntroductionR- Introduction
R- Introduction
Venkata Reddy Konasani
 
Minitab 17
Minitab 17Minitab 17
Minitab 17
Eko Ilman Gunawan
 
Why R? A Brief Introduction to the Open Source Statistics Platform
Why R? A Brief Introduction to the Open Source Statistics PlatformWhy R? A Brief Introduction to the Open Source Statistics Platform
Why R? A Brief Introduction to the Open Source Statistics Platform
Syracuse University
 
Non Parametric Tests
Non Parametric TestsNon Parametric Tests
Non Parametric Tests
Neeraj Kaushik
 
Introduction to R Programming
Introduction to R ProgrammingIntroduction to R Programming
Introduction to R Programming
izahn
 

Viewers also liked (20)

R tutorial
R tutorialR tutorial
R tutorial
 
R language tutorial
R language tutorialR language tutorial
R language tutorial
 
R programming Basic & Advanced
R programming Basic & AdvancedR programming Basic & Advanced
R programming Basic & Advanced
 
Seefeld stats r_bio
Seefeld stats r_bioSeefeld stats r_bio
Seefeld stats r_bio
 
Using r
Using rUsing r
Using r
 
R presentation
R presentationR presentation
R presentation
 
Rtutorial
RtutorialRtutorial
Rtutorial
 
Using R For Statistics
Using R For StatisticsUsing R For Statistics
Using R For Statistics
 
R Introduction
R IntroductionR Introduction
R Introduction
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
 
Bayesian models in r
Bayesian models in rBayesian models in r
Bayesian models in r
 
Presentation R basic teaching module
Presentation R basic teaching modulePresentation R basic teaching module
Presentation R basic teaching module
 
Data Science Academy Student Demo day--Divyanka Sharma, Businesses in nyc
Data Science Academy Student Demo day--Divyanka Sharma, Businesses in nycData Science Academy Student Demo day--Divyanka Sharma, Businesses in nyc
Data Science Academy Student Demo day--Divyanka Sharma, Businesses in nyc
 
Introduction to the R Statistical Computing Environment
Introduction to the R Statistical Computing EnvironmentIntroduction to the R Statistical Computing Environment
Introduction to the R Statistical Computing Environment
 
Introduction to R for Data Science :: Session 7 [Multiple Linear Regression i...
Introduction to R for Data Science :: Session 7 [Multiple Linear Regression i...Introduction to R for Data Science :: Session 7 [Multiple Linear Regression i...
Introduction to R for Data Science :: Session 7 [Multiple Linear Regression i...
 
R- Introduction
R- IntroductionR- Introduction
R- Introduction
 
Minitab 17
Minitab 17Minitab 17
Minitab 17
 
Why R? A Brief Introduction to the Open Source Statistics Platform
Why R? A Brief Introduction to the Open Source Statistics PlatformWhy R? A Brief Introduction to the Open Source Statistics Platform
Why R? A Brief Introduction to the Open Source Statistics Platform
 
Non Parametric Tests
Non Parametric TestsNon Parametric Tests
Non Parametric Tests
 
Introduction to R Programming
Introduction to R ProgrammingIntroduction to R Programming
Introduction to R Programming
 

Similar to 1 R Tutorial Introduction

Introduction to R and R Studio
Introduction to R and R StudioIntroduction to R and R Studio
Introduction to R and R Studio
Rupak Roy
 
R programming
R programmingR programming
R programming
Pooja Sharma
 
R presentation
R presentationR presentation
R presentation
ShwetDadhaniya1
 
Introducing Revolution R Open: Enhanced, Open Source R distribution from Revo...
Introducing Revolution R Open: Enhanced, Open Source R distribution from Revo...Introducing Revolution R Open: Enhanced, Open Source R distribution from Revo...
Introducing Revolution R Open: Enhanced, Open Source R distribution from Revo...Revolution Analytics
 
Rapid miner r extension 5
Rapid miner r extension 5Rapid miner r extension 5
Rapid miner r extension 5raz3366
 
R as supporting tool for analytics and simulation
R as supporting tool for analytics and simulationR as supporting tool for analytics and simulation
R as supporting tool for analytics and simulation
Alvaro Gil
 
BUSINESS ANALYTICS WITH R SOFTWARE DIAST
BUSINESS ANALYTICS WITH R SOFTWARE DIASTBUSINESS ANALYTICS WITH R SOFTWARE DIAST
BUSINESS ANALYTICS WITH R SOFTWARE DIAST
HaritikaChhatwal1
 
Introduction to statistical software R
Introduction to statistical software RIntroduction to statistical software R
Introduction to statistical software R
Paola Pozzolo - La tua statistica
 
R Brownbag Seminar 2.1
R Brownbag Seminar 2.1R Brownbag Seminar 2.1
R Brownbag Seminar 2.1
Muhammad Nabi Ahmad
 
A Handbook Of Statistical Analyses Using R
A Handbook Of Statistical Analyses Using RA Handbook Of Statistical Analyses Using R
A Handbook Of Statistical Analyses Using R
Nicole Adams
 
R_L1-Aug-2022.pptx
R_L1-Aug-2022.pptxR_L1-Aug-2022.pptx
R_L1-Aug-2022.pptx
ShantilalBhayal1
 
Introduction to R and Installation.pptx
Introduction  to R and Installation.pptxIntroduction  to R and Installation.pptx
Introduction to R and Installation.pptx
Dhanshyam Mahavadi
 
R language
R languageR language
R language
Kìshør Krîßh
 
Garishma xcs
Garishma xcsGarishma xcs
Garishma xcs
garishma bhatia
 
RStudio
RStudioRStudio
RStudio
Adeel Rasheed
 
R Studio (Report)
R Studio (Report)R Studio (Report)
R Studio (Report)
Adeel Rasheed
 
Introduction to R Programming
Introduction to R ProgrammingIntroduction to R Programming
Introduction to R Programming
hemasri56
 
R ext world/ useR! Kiev
R ext world/ useR!  KievR ext world/ useR!  Kiev
R ext world/ useR! Kiev
Ruslan Shevchenko
 
R programming
R programmingR programming
R programming
Shantanu Patil
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
Akshat Sharma
 

Similar to 1 R Tutorial Introduction (20)

Introduction to R and R Studio
Introduction to R and R StudioIntroduction to R and R Studio
Introduction to R and R Studio
 
R programming
R programmingR programming
R programming
 
R presentation
R presentationR presentation
R presentation
 
Introducing Revolution R Open: Enhanced, Open Source R distribution from Revo...
Introducing Revolution R Open: Enhanced, Open Source R distribution from Revo...Introducing Revolution R Open: Enhanced, Open Source R distribution from Revo...
Introducing Revolution R Open: Enhanced, Open Source R distribution from Revo...
 
Rapid miner r extension 5
Rapid miner r extension 5Rapid miner r extension 5
Rapid miner r extension 5
 
R as supporting tool for analytics and simulation
R as supporting tool for analytics and simulationR as supporting tool for analytics and simulation
R as supporting tool for analytics and simulation
 
BUSINESS ANALYTICS WITH R SOFTWARE DIAST
BUSINESS ANALYTICS WITH R SOFTWARE DIASTBUSINESS ANALYTICS WITH R SOFTWARE DIAST
BUSINESS ANALYTICS WITH R SOFTWARE DIAST
 
Introduction to statistical software R
Introduction to statistical software RIntroduction to statistical software R
Introduction to statistical software R
 
R Brownbag Seminar 2.1
R Brownbag Seminar 2.1R Brownbag Seminar 2.1
R Brownbag Seminar 2.1
 
A Handbook Of Statistical Analyses Using R
A Handbook Of Statistical Analyses Using RA Handbook Of Statistical Analyses Using R
A Handbook Of Statistical Analyses Using R
 
R_L1-Aug-2022.pptx
R_L1-Aug-2022.pptxR_L1-Aug-2022.pptx
R_L1-Aug-2022.pptx
 
Introduction to R and Installation.pptx
Introduction  to R and Installation.pptxIntroduction  to R and Installation.pptx
Introduction to R and Installation.pptx
 
R language
R languageR language
R language
 
Garishma xcs
Garishma xcsGarishma xcs
Garishma xcs
 
RStudio
RStudioRStudio
RStudio
 
R Studio (Report)
R Studio (Report)R Studio (Report)
R Studio (Report)
 
Introduction to R Programming
Introduction to R ProgrammingIntroduction to R Programming
Introduction to R Programming
 
R ext world/ useR! Kiev
R ext world/ useR!  KievR ext world/ useR!  Kiev
R ext world/ useR! Kiev
 
R programming
R programmingR programming
R programming
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
 

Recently uploaded

Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
GetInData
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
mzpolocfi
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
u86oixdj
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdfUnleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Enterprise Wired
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 

Recently uploaded (20)

Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdfUnleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 

1 R Tutorial Introduction

  • 1. R Programming Sakthi Dasan Sekar http://shakthydoss.com 1
  • 2. Introduction to R R is a programming language developed as an alternative for S language at AT&T Bell Laboratories by Robert Gentleman and Ross Ihaka. Due to its underlying philosophy and design R is incredibly excel in statistical computation and graphic visualization. R is free, open source with a very high activity community members. Available cross all platforms (Linux, Mac, Windows) http://shakthydoss.com 2
  • 3. Introduction to R R is much more than just its core language. It has a worldwide repository system, the Comprehensive R Archive Network (CRAN) http://cran.r-project.org As of 2011, there were more than 3,000 such packages hosted on CRAN and numerous more on other sites http://shakthydoss.com 3
  • 4. Introduction to R Cons of R Language R has a steep learning curve. Working with large datasets is limited by RAM size. http://shakthydoss.com 4
  • 5. Introduction to R Who use R in their business http://shakthydoss.com 5
  • 6. Introduction to R Understanding of R language • R Statement or Commands can be separated by a semicolon (;) or a newline. • Assignment operator in R is "<-" (although "=" also works). • All characters after # are treated as comments. • There is not multi line or block level Comments. • $ (dollar) operator in R is an analogous to .(dot) operator in other languages. Student$name Student$age http://shakthydoss.com 6
  • 7. Introduction to R Installing R Installing from CRAN (Comprehensive R Network) Website: http://cran.r-project.org/ R is actively being improved all the time, Make sure that you choose recent version to install. http://shakthydoss.com 7
  • 8. Introduction to R Installing R in windows For Windows and Mac OS X, one can simply download a self-installing binary. For Linux, installation varies. For the Debian distribution (including Ubuntu), R system can be installed using the regular package-management tools. Since R is open source, one can also compile and install it using the source code. http://shakthydoss.com 8
  • 9. Introduction to R Installing R in windows Window R package can be downloaded from https://cran.r-project.org/bin/windows/base/ Download R 3.X.X for Windows executable file (.exe) http://shakthydoss.com 9
  • 10. Introduction to R Click Next in the Setup Wizard. You can leave to setting to default. http://shakthydoss.com 10
  • 11. Introduction to R Open R Console (Rgui from your desktop) R Console http://shakthydoss.com 11
  • 12. Introduction to R IDE for R The RStudio project currently provides most of the desired features for an IDE in a novel way, making it easier and more productive to use R. The RStudio program can be run on the desktop or through a web browser. The desktop version is available for Windows, Mac OS X, and Linux platforms. http://shakthydoss.com 12
  • 13. Introduction to R Notable IDEs for R Name Platforms ESS Windows, Mac, Linux Eclipse Windows, Mac, Linux SciViews Windows, Mac, Linux JGR Windows, Mac, Linux Tinn-R Windows Notepad++ Windows Rgui Windows http://shakthydoss.com 13
  • 14. Introduction to R Installing RStudio is usually a straightforward process. For Windows and Mac OS X, one can simply download a self-installing binary. For Linux, installation varies. For the Debian distribution (including Ubuntu), RStudio can be installed using the regular package-management tools. http://shakthydoss.com 14
  • 15. Introduction to R Installing RStudio in windows. https://www.rstudio.com/products/rstudio/download/ Download Rstudio. Run the installation file. http://shakthydoss.com 15
  • 16. Introduction to R Open RStudio Source Panel R console Environment Panel File/Package Panel http://shakthydoss.com 16
  • 17. Introduction to R R workspace When R is started, it follows this process R is started in the working directory (aka workspace). If present, the .Rprofile file’s commands are executed. If present, the .Rdata file is loaded. http://shakthydoss.com 17
  • 18. Introduction to R R workspace R stores user-defined objects in workspace. At the end of an R session, the user can save an snapshot of the current workspace and reloaded automatically next time when R is started. getwd() - return working directory setwd() - set working directory http://shakthydoss.com 18
  • 19. Introduction to R In RStudio you can set the workspace by Tools -> Global Options http://shakthydoss.com 19
  • 20. Introduction to R • There are over 1,000 functions at the core of R, and new R functions are created all of the time. • Each R function comes with its own help page, which you can access by typing the function’s name after question mark Getting Help help.start() # Load HTML help pages into browser help(package) # List help page for "package" ?package # Shortform for "help(package)" help.search("keyword") # Search help pages for "keyword" ?help # For more options help(package=base) # List tasks in package "base" http://shakthydoss.com 20
  • 21. Introduction to R Packages • Many Data Scientist programmers and statisticians , use R to design tools that can help people analyze data. Many of these people contribute their code as preassembled collections of functions and objects called packages. • Each R package is hosted at http://cran.r-project.org • Not all packages are loaded by default, but can be load / install on demand library() # List available packages to load library("package") # loads the package library(help="package") # list package contents detach("package:pkg") # Unload the loaded package "pkg" install.packages(“package") # Install the package http://shakthydoss.com 21
  • 22. Introduction to R Installing package by GUI RStudio -> Tools -> Install Packages Check the package to load http://shakthydoss.com 22
  • 23. Introduction to R Knowledge Check http://shakthydoss.com 23
  • 24. Introduction to R Which of the statement is TRUE. A. R is a propitiatory general purpose language B. R excels in statically computation and graphic capabilities. C. R syntax are very similar to assembly language. D. R has no GUI Answer B http://shakthydoss.com 24
  • 25. Introduction to R Which of the statement is TRUE. A. Working with large datasets is limited by RAM size. B. R language is own by AT&T Bell Labs C. R available only for Unix platfroms D. R language is design for parallel programming and horizontally scalable systems. Answer A http://shakthydoss.com 25
  • 26. Introduction to R What is CRAN stands for A. Comprehensive R Network B. Computational R Network C. Comprehensive R Archive Network D. Computational R Archive Network Answer C http://shakthydoss.com 26
  • 27. Introduction to R Which not an IDE for R language A. RStudio B. RGUI C. Tinn-R D. Dreamweaver Answer D http://shakthydoss.com 27
  • 28. Introduction to R When R is started. A. It loads .Rprofile and .Rdata from workspace B. It attempts loads only .Rdata from workspace C. It attempts loads only .Rprofile from workspace D. Does nothing Answer A http://shakthydoss.com 28
  • 29. Introduction to R Function getwd() - return working directory A. TRUE B. FALSE Answer A http://shakthydoss.com 29
  • 30. Introduction to R Function setwd() - set working directory A. TRUE B. FALSE Answer A http://shakthydoss.com 30
  • 31. Introduction to R How to browser for all help documents in R A. help.start() B. help(help) C. library() D. install.packages(help) Answer A http://shakthydoss.com 31
  • 32. Introduction to R How to install new packages in R. A. Install(“package”) B. library(“package”) C. install.packages("package") D. load(“package”) Answer C http://shakthydoss.com 32
  • 33. Introduction to R How to load a installed package. A. load("package") B. library("package") C. install.packages("package") D. library() Answer B http://shakthydoss.com 33