SlideShare a Scribd company logo
INTRODUCTION TO R
PROGRAMMING
DONE BY:
HEMA SRI V(19MSS016)
GUIDED BY:
Dr. S. KANCHANA
• INTRODUCTION
• FEATURES OF R
• R VS PYTHON
• ENVIRONMENT IN R
• BASIC SYNTAX IN R
• ADVANTAGES OF R
• DISADVANTAGES OF R
• APPLICATIONS OF R
TABLE OF CONTENTS
• R is a programming language and free software developed by Ross Ihaka
and Robert Gentleman in 1993.
• R is an open-source programming language that is widely used as a
statistical software and data analysis tool.
• R generally comes with the Command-line interface.
• R is available across widely used platforms like Windows, Linux,
and macOS.
INTRODUCTION TO R
Statistical Features of R:
Basic Statistics: The most common basic statistics terms are the mean, mode, and
median. These are all known as “Measures of Central Tendency.” So using the R
language we can measure central tendency very easily.
Static graphics: R is rich with facilities for creating and developing interesting
static graphics. R contains functionality for many plot types including graphic
maps, mosaic plots, biplots, and the list goes on.
Probability distributions: Probability distributions play a vital role in statistics and
by using R we can easily handle various types of probability distribution such as
Binomial Distribution, Normal Distribution, Chi-squared Distribution and many
more.
Data analysis: It provides a large, coherent and integrated collection of tools for
data analysis.
Features of R Programming
Programming Features of R:
R Packages: One of the major features of R is it has a wide availability of
libraries. R has CRAN(Comprehensive R Archive Network), which is a
repository holding more than 10, 0000 packages.
Distributed Computing: Distributed computing is a model in which
components of a software system are shared among multiple computers to
improve efficiency and performance. Two new packages ddR and multidplyr
used for distributed programming in R were released in November 2015.
Feature R Python
Introduction
R is a language and environment for
statistical programming which includes
statistical computing and graphics.
Python is a general purpose
programming language for data analysis
and scientific computing
Objective
It has many features which are useful for
statistical analysis and representation.
It can be used to develop GUI
applications and web applications as
well as with embedded systems
Workability
It has many easy to use packages for
performing tasks
It can easily perform matrix
computation as well as optimization
Integrated development
environment
Various popular R IDEs are Rstudio,
RKward, R commander, etc.
Various popular Python IDEs are Spyder,
Eclipse+Pydev, Atom, etc.
Libraries and packages
There are many packages and libraries
like ggplot2, caret, etc.
Some essential packages and libraries
are Pandas, Numpy, Scipy, etc.
Scope
It is mainly used for complex data
analysis in data science.
It takes a more streamlined approach
for data science projects.
R VS PYTHON
The environment is a virtual space that is triggered when an interpreter of a
programming language is launched. Simply, the environment is a collection
of all the objects, variables, and functions.
Create a New Environment
An environment in R programming can be created using new.env() function.
Further, the variables can be accessed using $ or [[ ]] operator. But, each
variable is stored in different memory locations.
Syntax: new.env(hash = TRUE)
Parameters:
hash: indicates logical value. If TRUE, environments uses a hash table
Environment in R Programming
Syntax of R program
A program in R is made up of three things: Variables, Comments, and Keywords.
Variables are used to store the data, Comments are used to improve code
readability, and Keywords are reserved words that hold a specific meaning to the
compiler.
Variables in R
Previously, we wrote all our code in a print() but we don’t have a way to address
them as to perform further operations. This problem can be solved by using
variables which like any other programming language are the name given to
reserved memory locations that can store any type of data.
In R, the assignment can be denoted in three ways:
• = (Simple Assignment)
• <- (Leftward Assignment)
• -> (Rightward Assignment)
Basic Syntax in R Programming
Comments in R
Comments are a way to improve your code’s readability and are only
meant for the user so the interpreter ignores it. Only single-line comments
are available in R but we can also use multiline comments by using a
simple trick which is shown below. Single line comments can be written by
using # at the beginning of the statement.
Keywords in R
Keywords are the words reserved by a program because they have a
special meaning thus a keyword can’t be used as a variable name, function
name, etc.
We can view these keywords by using either help(reserved) or ?reserved.
• R is the most comprehensive statistical analysis package. As
new technology and concepts often appear first in R.
• As R programming language is an open source. Thus, you can
run R anywhere and at any time.
• R programming language is suitable for GNU/Linux and
Windows operating system.
• R programming is cross-platform which runs on any
operating system.
• In R, everyone is welcome to provide new packages, bug
fixes, and code enhancements.
Advantages of R:
• In the R programming language, the standard of some
packages is less than perfect.
• Although, R commands give little pressure to memory
management. So R programming language may consume all
available memory.
• In R basically, nobody to complain if something doesn’t work.
• R programming language is much slower than other
programming languages such as Python and MATLAB.
Disadvantages of R:
• We use R for Data Science. It gives us a broad variety of libraries
related to statistics. It also provides the environment for statistical
computing and design.
• R is used by many quantitative analysts as its programming tool.
Thus, it helps in data importing and cleaning.
• R is the most prevalent language. So many data analysts and
research programmers use it. Hence, it is used as a fundamental tool
for finance.
• Tech giants like Google, Facebook, bing, Twitter, Accenture, Wipro
and many more using R nowadays.
Applications of R:
THANK YOU
REFERENCE : https://www.geeksforgeeks.org/
Ad

More Related Content

What's hot (20)

Hashing
HashingHashing
Hashing
Amar Jukuntla
 
Data Types and Structures in R
Data Types and Structures in RData Types and Structures in R
Data Types and Structures in R
Rupak Roy
 
R studio
R studio R studio
R studio
Kinza Irshad
 
R Programming: Introduction to Matrices
R Programming: Introduction to MatricesR Programming: Introduction to Matrices
R Programming: Introduction to Matrices
Rsquared Academy
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure
NUPOORAWSARMOL
 
List,tuple,dictionary
List,tuple,dictionaryList,tuple,dictionary
List,tuple,dictionary
nitamhaske
 
Algorithm.ppt
Algorithm.pptAlgorithm.ppt
Algorithm.ppt
Tareq Hasan
 
Scale Invariant Feature Transform
Scale Invariant Feature TransformScale Invariant Feature Transform
Scale Invariant Feature Transform
kislayabhi
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
Abrish06
 
Exploratory Data Analysis
Exploratory Data AnalysisExploratory Data Analysis
Exploratory Data Analysis
Umair Shafique
 
Graphs in data structure
Graphs in data structureGraphs in data structure
Graphs in data structure
hamza javed
 
CS8391 Data Structures Part B Questions Anna University
CS8391 Data Structures Part B Questions Anna UniversityCS8391 Data Structures Part B Questions Anna University
CS8391 Data Structures Part B Questions Anna University
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Compiler design syntax analysis
Compiler design syntax analysisCompiler design syntax analysis
Compiler design syntax analysis
Richa Sharma
 
Logistic Regression: Predicting The Chances Of Coronary Heart Disease
Logistic Regression: Predicting The Chances Of Coronary Heart DiseaseLogistic Regression: Predicting The Chances Of Coronary Heart Disease
Logistic Regression: Predicting The Chances Of Coronary Heart Disease
Michael Lieberman
 
Csv file read and write
Csv file read and writeCsv file read and write
Csv file read and write
comsats university of science information technology
 
Class ppt intro to r
Class ppt intro to rClass ppt intro to r
Class ppt intro to r
JigsawAcademy2014
 
Hashing in datastructure
Hashing in datastructureHashing in datastructure
Hashing in datastructure
rajshreemuthiah
 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
DataminingTools Inc
 
Chart and graphs in R programming language
Chart and graphs in R programming language Chart and graphs in R programming language
Chart and graphs in R programming language
CHANDAN KUMAR
 
AVL Tree
AVL TreeAVL Tree
AVL Tree
Dr Sandeep Kumar Poonia
 

Similar to Introduction to R Programming (20)

R programming Language , Rahul Singh
R programming Language , Rahul SinghR programming Language , Rahul Singh
R programming Language , Rahul Singh
Ravi Basil
 
R programming language
R programming languageR programming language
R programming language
Keerti Verma
 
R Programming and Lab - Unit I PPTX with examples
R Programming and Lab - Unit I PPTX with examplesR Programming and Lab - Unit I PPTX with examples
R Programming and Lab - Unit I PPTX with examples
SARAVANA KUMAR SS
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
Akshat Sharma
 
R programming
R programmingR programming
R programming
Pooja Sharma
 
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 language
R languageR language
R language
Kìshør Krîßh
 
R programming
R programmingR programming
R programming
Shantanu Patil
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptx
ranapoonam1
 
Unit1_Introduction to R.pdf
Unit1_Introduction to R.pdfUnit1_Introduction to R.pdf
Unit1_Introduction to R.pdf
MDDidarulAlam15
 
R Course Online
R Course OnlineR Course Online
R Course Online
bestonlinecoursescoupon
 
R basics for MBA Students[1].pptx
R basics for MBA Students[1].pptxR basics for MBA Students[1].pptx
R basics for MBA Students[1].pptx
rajalakshmi5921
 
Big Data - Analytics with R
Big Data - Analytics with RBig Data - Analytics with R
Big Data - Analytics with R
Techsparks
 
DOC-20240829-WA0001 power point presentation
DOC-20240829-WA0001 power point presentationDOC-20240829-WA0001 power point presentation
DOC-20240829-WA0001 power point presentation
AnkushKabir
 
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
 
R for data analytics
R for data analyticsR for data analytics
R for data analytics
VijayMohan Vasu
 
Presentation.pptx read and learn and download
Presentation.pptx read and learn and downloadPresentation.pptx read and learn and download
Presentation.pptx read and learn and download
Shubhamyadav41303
 
R_L1-Aug-2022.pptx
R_L1-Aug-2022.pptxR_L1-Aug-2022.pptx
R_L1-Aug-2022.pptx
ShantilalBhayal1
 
R programming
R programmingR programming
R programming
TIB Academy
 
R introduction
R introductionR introduction
R introduction
Teachers Mitraa
 
R programming Language , Rahul Singh
R programming Language , Rahul SinghR programming Language , Rahul Singh
R programming Language , Rahul Singh
Ravi Basil
 
R programming language
R programming languageR programming language
R programming language
Keerti Verma
 
R Programming and Lab - Unit I PPTX with examples
R Programming and Lab - Unit I PPTX with examplesR Programming and Lab - Unit I PPTX with examples
R Programming and Lab - Unit I PPTX with examples
SARAVANA KUMAR SS
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
Akshat Sharma
 
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
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptx
ranapoonam1
 
Unit1_Introduction to R.pdf
Unit1_Introduction to R.pdfUnit1_Introduction to R.pdf
Unit1_Introduction to R.pdf
MDDidarulAlam15
 
R basics for MBA Students[1].pptx
R basics for MBA Students[1].pptxR basics for MBA Students[1].pptx
R basics for MBA Students[1].pptx
rajalakshmi5921
 
Big Data - Analytics with R
Big Data - Analytics with RBig Data - Analytics with R
Big Data - Analytics with R
Techsparks
 
DOC-20240829-WA0001 power point presentation
DOC-20240829-WA0001 power point presentationDOC-20240829-WA0001 power point presentation
DOC-20240829-WA0001 power point presentation
AnkushKabir
 
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
 
Presentation.pptx read and learn and download
Presentation.pptx read and learn and downloadPresentation.pptx read and learn and download
Presentation.pptx read and learn and download
Shubhamyadav41303
 
Ad

Recently uploaded (20)

YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Ad

Introduction to R Programming

  • 1. INTRODUCTION TO R PROGRAMMING DONE BY: HEMA SRI V(19MSS016) GUIDED BY: Dr. S. KANCHANA
  • 2. • INTRODUCTION • FEATURES OF R • R VS PYTHON • ENVIRONMENT IN R • BASIC SYNTAX IN R • ADVANTAGES OF R • DISADVANTAGES OF R • APPLICATIONS OF R TABLE OF CONTENTS
  • 3. • R is a programming language and free software developed by Ross Ihaka and Robert Gentleman in 1993. • R is an open-source programming language that is widely used as a statistical software and data analysis tool. • R generally comes with the Command-line interface. • R is available across widely used platforms like Windows, Linux, and macOS. INTRODUCTION TO R
  • 4. Statistical Features of R: Basic Statistics: The most common basic statistics terms are the mean, mode, and median. These are all known as “Measures of Central Tendency.” So using the R language we can measure central tendency very easily. Static graphics: R is rich with facilities for creating and developing interesting static graphics. R contains functionality for many plot types including graphic maps, mosaic plots, biplots, and the list goes on. Probability distributions: Probability distributions play a vital role in statistics and by using R we can easily handle various types of probability distribution such as Binomial Distribution, Normal Distribution, Chi-squared Distribution and many more. Data analysis: It provides a large, coherent and integrated collection of tools for data analysis. Features of R Programming
  • 5. Programming Features of R: R Packages: One of the major features of R is it has a wide availability of libraries. R has CRAN(Comprehensive R Archive Network), which is a repository holding more than 10, 0000 packages. Distributed Computing: Distributed computing is a model in which components of a software system are shared among multiple computers to improve efficiency and performance. Two new packages ddR and multidplyr used for distributed programming in R were released in November 2015.
  • 6. Feature R Python Introduction R is a language and environment for statistical programming which includes statistical computing and graphics. Python is a general purpose programming language for data analysis and scientific computing Objective It has many features which are useful for statistical analysis and representation. It can be used to develop GUI applications and web applications as well as with embedded systems Workability It has many easy to use packages for performing tasks It can easily perform matrix computation as well as optimization Integrated development environment Various popular R IDEs are Rstudio, RKward, R commander, etc. Various popular Python IDEs are Spyder, Eclipse+Pydev, Atom, etc. Libraries and packages There are many packages and libraries like ggplot2, caret, etc. Some essential packages and libraries are Pandas, Numpy, Scipy, etc. Scope It is mainly used for complex data analysis in data science. It takes a more streamlined approach for data science projects. R VS PYTHON
  • 7. The environment is a virtual space that is triggered when an interpreter of a programming language is launched. Simply, the environment is a collection of all the objects, variables, and functions. Create a New Environment An environment in R programming can be created using new.env() function. Further, the variables can be accessed using $ or [[ ]] operator. But, each variable is stored in different memory locations. Syntax: new.env(hash = TRUE) Parameters: hash: indicates logical value. If TRUE, environments uses a hash table Environment in R Programming
  • 8. Syntax of R program A program in R is made up of three things: Variables, Comments, and Keywords. Variables are used to store the data, Comments are used to improve code readability, and Keywords are reserved words that hold a specific meaning to the compiler. Variables in R Previously, we wrote all our code in a print() but we don’t have a way to address them as to perform further operations. This problem can be solved by using variables which like any other programming language are the name given to reserved memory locations that can store any type of data. In R, the assignment can be denoted in three ways: • = (Simple Assignment) • <- (Leftward Assignment) • -> (Rightward Assignment) Basic Syntax in R Programming
  • 9. Comments in R Comments are a way to improve your code’s readability and are only meant for the user so the interpreter ignores it. Only single-line comments are available in R but we can also use multiline comments by using a simple trick which is shown below. Single line comments can be written by using # at the beginning of the statement. Keywords in R Keywords are the words reserved by a program because they have a special meaning thus a keyword can’t be used as a variable name, function name, etc. We can view these keywords by using either help(reserved) or ?reserved.
  • 10. • R is the most comprehensive statistical analysis package. As new technology and concepts often appear first in R. • As R programming language is an open source. Thus, you can run R anywhere and at any time. • R programming language is suitable for GNU/Linux and Windows operating system. • R programming is cross-platform which runs on any operating system. • In R, everyone is welcome to provide new packages, bug fixes, and code enhancements. Advantages of R:
  • 11. • In the R programming language, the standard of some packages is less than perfect. • Although, R commands give little pressure to memory management. So R programming language may consume all available memory. • In R basically, nobody to complain if something doesn’t work. • R programming language is much slower than other programming languages such as Python and MATLAB. Disadvantages of R:
  • 12. • We use R for Data Science. It gives us a broad variety of libraries related to statistics. It also provides the environment for statistical computing and design. • R is used by many quantitative analysts as its programming tool. Thus, it helps in data importing and cleaning. • R is the most prevalent language. So many data analysts and research programmers use it. Hence, it is used as a fundamental tool for finance. • Tech giants like Google, Facebook, bing, Twitter, Accenture, Wipro and many more using R nowadays. Applications of R:
  • 13. THANK YOU REFERENCE : https://www.geeksforgeeks.org/