SlideShare a Scribd company logo
Introduction to R.
Handson Institute of Data Science
Introduction to R.
R is a programming language and software environment. R was created by Ross
Ihaka and Robert Gentleman at the University ofAuckland, New Zealand, and is
currently developed by the R Development CoreTeam.
www.handsonsystem.com 2
R is used for
o Statistical analysis
o Graphics representation
o Reporting
www.handsonsystem.com 3
As stated earlier, R is a programming language and software environment for
statistical analysis, graphics representation and reporting.The following are the
important features of R:
R is a well-developed, simple and effective programming language which includes
conditionals, loops, user defined recursive functions and input and output facilities.
R has an effective data handling and storage facility.
R provides a suite of operators for calculations on arrays, lists, vectors and
matrices.
R provides a large, coherent and integrated collection of tools for data analysis.
R provides graphical facilities for data analysis and display either directly at the
computer or printing at the papers.
Features of R
www.handsonsystem.com 4
R-Data Objects
In contrast to other programming languages like C and java in R, the variables are not
declared as some data type.The variables are assigned with R-Objects and the data type of
the R-object becomes the data type of the variable.There are many types of R-objects.The
frequently used ones are:
o Vectors
o Lists
o Matrices
o Arrays
o Factors
o Data Frames
The simplest of these objects is the vector object and there are six data types of these atomic
vectors, also termed as six classes of vectors.The other R-Objects are built upon the atomic
vectors.
www.handsonsystem.com 5
R-Data Types
In R programming,
the very basic data
types are the R-
objects called
vectors which hold
elements of
different classes as
shown beside.
Please note in R the
number of classes is
not confined to only
the six types
• DataType • Example
• Logical • True, False
• Numeric • 46.3, 958
• Integer • 2L.3L,45L
• Complex • 3+2i
• Character • ’a’, ’Good’, ’False’, ’56.9’
• Raw • “Hellow”
www.handsonsystem.com 6
Vectors
When you want to create vector with more than one
element, you should use c() function which means to
combine the elements into a vector.
# Create a vector.
orange <-c('orange','green',"yellow")
print(orange)
When we execute the above code, it produces the following
result:
[1] "orange" "green" "yellow"
www.handsonsystem.com 7
Thank You
For Hands-on practice
Reach us: www.handsonsystem.com
www.handsonsystem.com 8

More Related Content

Similar to Introduction to R

R programming language
R programming languageR programming language
R programming language
Keerti Verma
 
R for data analytics
R for data analyticsR for data analytics
R for data analytics
VijayMohan Vasu
 
FULL R PROGRAMMING METERIAL_2.pdf
FULL R PROGRAMMING METERIAL_2.pdfFULL R PROGRAMMING METERIAL_2.pdf
FULL R PROGRAMMING METERIAL_2.pdf
attalurilalitha
 
Introduction to R Programming
Introduction to R ProgrammingIntroduction to R Programming
Introduction to R Programming
hemasri56
 
An introduction to R is a document useful
An introduction to R is a document usefulAn introduction to R is a document useful
An introduction to R is a document useful
ssuser3c3f88
 
Intro to data science module 1 r
Intro to data science module 1 rIntro to data science module 1 r
Intro to data science module 1 r
amuletc
 
Introduction to R - by Chameera Dedduwage
Introduction to R - by Chameera DedduwageIntroduction to R - by Chameera Dedduwage
Introduction to R - by Chameera Dedduwage
Chameera Dedduwage
 
R GUI.ppt
R GUI.pptR GUI.ppt
R GUI.ppt
AqeelAmjad1
 
qutb haji.ppt
qutb haji.pptqutb haji.ppt
qutb haji.ppt
AqeelAmjad1
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
Akshat Sharma
 
R language
R languageR language
R language
Kìshør Krîßh
 
R Programming - part 1.pdf
R Programming - part 1.pdfR Programming - part 1.pdf
R Programming - part 1.pdf
RohanBorgalli
 
Best corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiBest corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbai
Unmesh Baile
 
Unit 3
Unit 3Unit 3
Lecture_R.ppt
Lecture_R.pptLecture_R.ppt
Lecture_R.ppt
Abebe334138
 
Using R for Cyber Security Part 1
Using R for Cyber Security Part 1Using R for Cyber Security Part 1
Using R for Cyber Security Part 1Ajay Ohri
 
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
 
UNIT-1 Start Learning R.pdf
UNIT-1 Start Learning R.pdfUNIT-1 Start Learning R.pdf
UNIT-1 Start Learning R.pdf
Sweta Kumari Barnwal
 
2 it unit-1 start learning r
2 it   unit-1 start learning r2 it   unit-1 start learning r
2 it unit-1 start learning r
Netaji Gandi
 
Analytics Beyond RAM Capacity using R
Analytics Beyond RAM Capacity using RAnalytics Beyond RAM Capacity using R
Analytics Beyond RAM Capacity using R
Alex Palamides
 

Similar to Introduction to R (20)

R programming language
R programming languageR programming language
R programming language
 
R for data analytics
R for data analyticsR for data analytics
R for data analytics
 
FULL R PROGRAMMING METERIAL_2.pdf
FULL R PROGRAMMING METERIAL_2.pdfFULL R PROGRAMMING METERIAL_2.pdf
FULL R PROGRAMMING METERIAL_2.pdf
 
Introduction to R Programming
Introduction to R ProgrammingIntroduction to R Programming
Introduction to R Programming
 
An introduction to R is a document useful
An introduction to R is a document usefulAn introduction to R is a document useful
An introduction to R is a document useful
 
Intro to data science module 1 r
Intro to data science module 1 rIntro to data science module 1 r
Intro to data science module 1 r
 
Introduction to R - by Chameera Dedduwage
Introduction to R - by Chameera DedduwageIntroduction to R - by Chameera Dedduwage
Introduction to R - by Chameera Dedduwage
 
R GUI.ppt
R GUI.pptR GUI.ppt
R GUI.ppt
 
qutb haji.ppt
qutb haji.pptqutb haji.ppt
qutb haji.ppt
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
 
R language
R languageR language
R language
 
R Programming - part 1.pdf
R Programming - part 1.pdfR Programming - part 1.pdf
R Programming - part 1.pdf
 
Best corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiBest corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbai
 
Unit 3
Unit 3Unit 3
Unit 3
 
Lecture_R.ppt
Lecture_R.pptLecture_R.ppt
Lecture_R.ppt
 
Using R for Cyber Security Part 1
Using R for Cyber Security Part 1Using R for Cyber Security Part 1
Using R for Cyber Security Part 1
 
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
 
UNIT-1 Start Learning R.pdf
UNIT-1 Start Learning R.pdfUNIT-1 Start Learning R.pdf
UNIT-1 Start Learning R.pdf
 
2 it unit-1 start learning r
2 it   unit-1 start learning r2 it   unit-1 start learning r
2 it unit-1 start learning r
 
Analytics Beyond RAM Capacity using R
Analytics Beyond RAM Capacity using RAnalytics Beyond RAM Capacity using R
Analytics Beyond RAM Capacity using R
 

More from AvinabaMukherjee6

R Programming: Variable
R Programming: VariableR Programming: Variable
R Programming: Variable
AvinabaMukherjee6
 
Data Science
Data ScienceData Science
Data Science
AvinabaMukherjee6
 
SAS Frequency Table
SAS Frequency TableSAS Frequency Table
SAS Frequency Table
AvinabaMukherjee6
 
SAS Creating List Report
SAS Creating List ReportSAS Creating List Report
SAS Creating List Report
AvinabaMukherjee6
 
Hypothesis.pptx
Hypothesis.pptxHypothesis.pptx
Hypothesis.pptx
AvinabaMukherjee6
 
SAS Defined Format.pptx
SAS Defined Format.pptxSAS Defined Format.pptx
SAS Defined Format.pptx
AvinabaMukherjee6
 
SAS Tutorial: Merging SAS Datasets
SAS Tutorial: Merging SAS DatasetsSAS Tutorial: Merging SAS Datasets
SAS Tutorial: Merging SAS Datasets
AvinabaMukherjee6
 
SAS Tutorial Sorting Data.pptx
SAS Tutorial Sorting Data.pptxSAS Tutorial Sorting Data.pptx
SAS Tutorial Sorting Data.pptx
AvinabaMukherjee6
 

More from AvinabaMukherjee6 (8)

R Programming: Variable
R Programming: VariableR Programming: Variable
R Programming: Variable
 
Data Science
Data ScienceData Science
Data Science
 
SAS Frequency Table
SAS Frequency TableSAS Frequency Table
SAS Frequency Table
 
SAS Creating List Report
SAS Creating List ReportSAS Creating List Report
SAS Creating List Report
 
Hypothesis.pptx
Hypothesis.pptxHypothesis.pptx
Hypothesis.pptx
 
SAS Defined Format.pptx
SAS Defined Format.pptxSAS Defined Format.pptx
SAS Defined Format.pptx
 
SAS Tutorial: Merging SAS Datasets
SAS Tutorial: Merging SAS DatasetsSAS Tutorial: Merging SAS Datasets
SAS Tutorial: Merging SAS Datasets
 
SAS Tutorial Sorting Data.pptx
SAS Tutorial Sorting Data.pptxSAS Tutorial Sorting Data.pptx
SAS Tutorial Sorting Data.pptx
 

Recently uploaded

FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
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
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
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
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 

Recently uploaded (20)

FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
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
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 

Introduction to R

  • 1. Introduction to R. Handson Institute of Data Science
  • 2. Introduction to R. R is a programming language and software environment. R was created by Ross Ihaka and Robert Gentleman at the University ofAuckland, New Zealand, and is currently developed by the R Development CoreTeam. www.handsonsystem.com 2
  • 3. R is used for o Statistical analysis o Graphics representation o Reporting www.handsonsystem.com 3
  • 4. As stated earlier, R is a programming language and software environment for statistical analysis, graphics representation and reporting.The following are the important features of R: R is a well-developed, simple and effective programming language which includes conditionals, loops, user defined recursive functions and input and output facilities. R has an effective data handling and storage facility. R provides a suite of operators for calculations on arrays, lists, vectors and matrices. R provides a large, coherent and integrated collection of tools for data analysis. R provides graphical facilities for data analysis and display either directly at the computer or printing at the papers. Features of R www.handsonsystem.com 4
  • 5. R-Data Objects In contrast to other programming languages like C and java in R, the variables are not declared as some data type.The variables are assigned with R-Objects and the data type of the R-object becomes the data type of the variable.There are many types of R-objects.The frequently used ones are: o Vectors o Lists o Matrices o Arrays o Factors o Data Frames The simplest of these objects is the vector object and there are six data types of these atomic vectors, also termed as six classes of vectors.The other R-Objects are built upon the atomic vectors. www.handsonsystem.com 5
  • 6. R-Data Types In R programming, the very basic data types are the R- objects called vectors which hold elements of different classes as shown beside. Please note in R the number of classes is not confined to only the six types • DataType • Example • Logical • True, False • Numeric • 46.3, 958 • Integer • 2L.3L,45L • Complex • 3+2i • Character • ’a’, ’Good’, ’False’, ’56.9’ • Raw • “Hellow” www.handsonsystem.com 6
  • 7. Vectors When you want to create vector with more than one element, you should use c() function which means to combine the elements into a vector. # Create a vector. orange <-c('orange','green',"yellow") print(orange) When we execute the above code, it produces the following result: [1] "orange" "green" "yellow" www.handsonsystem.com 7
  • 8. Thank You For Hands-on practice Reach us: www.handsonsystem.com www.handsonsystem.com 8