SlideShare a Scribd company logo
Presentation
Presented
By
Momna Fatima
Reg No: 2277
Bs IT (Evening) 7th
Sem
About R Language
History of R Language
Features of R Language
Features of R Language
Reasons to Learn R Language
•How to Download R
•Installing R Studio
R Studio Window:
R – graph:
R language is mostly used for statistics and data analytics purposes to
represent the data graphically in the software. To represent those data
graphically, charts and graphs are used in R.
There are hundreds of charts and graphs present in R. For example, bar
plots, box plots, mosaic plots, dot charts, coplot, histograms, pie charts,
scatter graphs, etc.
Types of R – Charts
• Pie Diagram or Pie Chart
• Bar Plot or Bar Chart
• Histogram
• Scatter Plot
Pie Diagram or Pie Chart
The pie chart is a circular chart divided into different segments
according to the ratio of data provided. The total value of the pie
is 100 and the segments tell the fraction of the whole pie. It is
another method to represent statistical data in graphical form
and the pie() function is used to perform the same.
Syntax: pie(x, labels, col, main, radius)
where,
• x is the data vector
• labels show names given to slices
• col fills the color in the slices as the given parameter
• main shows the title name of the pie chart
Example:
# Create a vector of pies
x <- c(10,20,30,40)
# Create a vector of labels
mylabel <- c("Apples", "Bananas", "Cherries", "Dates")
# Display the pie chart with labels
pie(x, label = mylabel, main = "Fruits")
Out Put:
You can add a color to each pie with the col parameter:
# Create a vector of colors
colors<- c("blue", "yellow", "green", "black")
# Display the pie chart with colors
pie(x, label = mylabel, main = "Fruits", col = colors)
Legend
To add a list of explanations for each pie, use
the legend() function:
Example:
# Create a vector of labels
mylabel <- c("Apples", "Bananas", "Cherries", "Dates")
# Create a vector of colors
colors <- c("blue", "yellow", "green", "black")
# Display the pie chart with colors
pie(x, label = mylabel, main = "Pie Chart", col = colors)
# Display the explanation box
legend("bottomright", mylabel, fill = colors)
The legend can be positioned as either:
bottomright, bottom, bottomleft, left, topleft, top, topright,
right, center
Out Put:
Bar Charts
A bar chart uses rectangular bars to visualize data. A bar chart
represents data in rectangular bars with the length of the bar
proportional to the value of the variable. R uses the
function barplot() to create bar charts.
Syntax: barplot(data, xlab, ylab)
where:
• data is the data vector to be represented on the y-axis
• xlab is the label given to the x-axis
• ylab is the label given to the y-axis
• names. arg defines the names of each observation in the x-
axis
Example:
x <- c(“Jan", “Feb", “March", “April")
y <- c(2, 4, 6, 8)
barplot(y,name.args = x, col = "yellow", xlab = "Month",
ylab = "Revenue", border = "red“, main = "Revenue bar
chart")
Out Put:
Histogram:
A histogram is a graphical representation used to create a graph with
bars representing the frequency of grouped data in a vector. The
histogram is the same as a bar chart, but the only difference is that it
represents the frequency of grouped data rather than the data itself.
Syntax: hist(x, col, border, main, xlab, ylab)
where:
• x is the data vector
• col specifies the color of the bars to be filled
• border specifies the color of the border of bars
• main specifies the title name of the histogram
• xlab specifies the x-axis label
• ylab specifies the y-axis label
• xlim: is used to specify the range of values on the x-axis.
• ylim: is used to specify the range of values on the y-axis.
Example:
v <- c(12, 24, 16, 38, 21, 13, 55, 17, 39, 10, 60, 59, 58)
hist(v, col = “green", xlab = “weight“ ,
ylab = “Frequency", border = "red“, main = “Frequency bar
chart“, ylim = c (0,5), xlim =c (10,60))
Out put:
Scatter plot:
A "scatter plot" is a type of plot used to display the relationship between
two numerical variables, and plots one dot for each observation.
It needs two vectors of the same length, one for the x-axis (horizontal)
and one for the y-axis (vertical).a
Syntax: plot(x, y, type, xlab, ylab, main)
Where,
• x is the data vector represented on the x-axis
• y is the data vector represented on the y-axis
• xlab specifies the label for the x-axis
• ylab specifies the label for the y-axis
• main specifies the title name of the graph
• xlim: This parameter is used for plotting values of x.
• ylim: This parameter is used for plotting values of y.
Example:
x <- c(5,7,8,7,2,2,9,4,11,12,9,6)
y <- c(99,86,87,88,111,103,87,94,78,77,85,86)
plot(x, y, main="Observation of Cars", xlab="Car age", ylab="Car
speed“ , xlim = c(2,12), ylim = c(80,5 )
To recap, the observation in the example above is the result of 12 cars
passing by.
Out Put:
The x-axis shows how old the car is.
The y-axis shows the speed of the car when it passes.
Are there any relationships between the observations?
It seems that the newer the car, the faster it drives.

More Related Content

Similar to R programming.pptx r language easy concept (20)

AI 11 - Data Visualizaton.pdf ......m.........
AI 11 - Data Visualizaton.pdf ......m.........AI 11 - Data Visualizaton.pdf ......m.........
AI 11 - Data Visualizaton.pdf ......m.........
2711hb
 
pie chart ppt.pdf ppt on pie chart. Veri formal
pie chart ppt.pdf ppt on pie chart. Veri formalpie chart ppt.pdf ppt on pie chart. Veri formal
pie chart ppt.pdf ppt on pie chart. Veri formal
rjyotisingh123
 
matplotlib library - visualization .pptx
matplotlib library - visualization .pptxmatplotlib library - visualization .pptx
matplotlib library - visualization .pptx
sivamathi12
 
UNIT_4_data visualization.pptx
UNIT_4_data visualization.pptxUNIT_4_data visualization.pptx
UNIT_4_data visualization.pptx
BhagyasriPatel2
 
Data visualization using R
Data visualization using RData visualization using R
Data visualization using R
Ummiya Mohammedi
 
Statistical Graphics / Exploratory Data Analysis - DAY 2 - 8614 - B.Ed - AIOU
Statistical Graphics / Exploratory Data Analysis - DAY 2 - 8614 - B.Ed - AIOUStatistical Graphics / Exploratory Data Analysis - DAY 2 - 8614 - B.Ed - AIOU
Statistical Graphics / Exploratory Data Analysis - DAY 2 - 8614 - B.Ed - AIOU
EqraBaig
 
Data Exploration in R.pptx
Data Exploration in R.pptxData Exploration in R.pptx
Data Exploration in R.pptx
Ramakrishna Reddy Bijjam
 
DA_THEORY_PPT DA_THEORY_PPT DA_THEORY_PPT
DA_THEORY_PPT DA_THEORY_PPT DA_THEORY_PPTDA_THEORY_PPT DA_THEORY_PPT DA_THEORY_PPT
DA_THEORY_PPT DA_THEORY_PPT DA_THEORY_PPT
20harish08
 
R and Visualization: A match made in Heaven
R and Visualization: A match made in HeavenR and Visualization: A match made in Heaven
R and Visualization: A match made in Heaven
Edureka!
 
An implementation of the grammar of graphics: ggplot
An implementation of the grammar of graphics: ggplotAn implementation of the grammar of graphics: ggplot
An implementation of the grammar of graphics: ggplot
Hoffman Lab
 
M4_DAR_part1. module part 4 analystics with r
M4_DAR_part1. module part 4 analystics with rM4_DAR_part1. module part 4 analystics with r
M4_DAR_part1. module part 4 analystics with r
LalithauLali
 
R and Visualization: A match made in Heaven
R and Visualization: A match made in HeavenR and Visualization: A match made in Heaven
R and Visualization: A match made in Heaven
Edureka!
 
Introduction to R Short course Fall 2016
Introduction to R Short course Fall 2016Introduction to R Short course Fall 2016
Introduction to R Short course Fall 2016
Spencer Fox
 
r studio presentation.pptx
r studio presentation.pptxr studio presentation.pptx
r studio presentation.pptx
DevikaRaj14
 
r studio presentation.pptx
r studio presentation.pptxr studio presentation.pptx
r studio presentation.pptx
DevikaRaj14
 
Introduction to Data Visualization for Agriculture and Allied Sciences using ...
Introduction to Data Visualization for Agriculture and Allied Sciences using ...Introduction to Data Visualization for Agriculture and Allied Sciences using ...
Introduction to Data Visualization for Agriculture and Allied Sciences using ...
Shubham Shah
 
Q plot tutorial
Q plot tutorialQ plot tutorial
Q plot tutorial
Abhik Seal
 
TID Chapter 5 Introduction To Charts And Graph
TID Chapter 5 Introduction To Charts And GraphTID Chapter 5 Introduction To Charts And Graph
TID Chapter 5 Introduction To Charts And Graph
WanBK Leo
 
Data Visualization in R (Graph, Trend, etc)
Data Visualization in R (Graph, Trend, etc)Data Visualization in R (Graph, Trend, etc)
Data Visualization in R (Graph, Trend, etc)
Rudyansyah -
 
Introduction to GGVIS Visualization
Introduction to GGVIS VisualizationIntroduction to GGVIS Visualization
Introduction to GGVIS Visualization
HemantSingh311
 
AI 11 - Data Visualizaton.pdf ......m.........
AI 11 - Data Visualizaton.pdf ......m.........AI 11 - Data Visualizaton.pdf ......m.........
AI 11 - Data Visualizaton.pdf ......m.........
2711hb
 
pie chart ppt.pdf ppt on pie chart. Veri formal
pie chart ppt.pdf ppt on pie chart. Veri formalpie chart ppt.pdf ppt on pie chart. Veri formal
pie chart ppt.pdf ppt on pie chart. Veri formal
rjyotisingh123
 
matplotlib library - visualization .pptx
matplotlib library - visualization .pptxmatplotlib library - visualization .pptx
matplotlib library - visualization .pptx
sivamathi12
 
UNIT_4_data visualization.pptx
UNIT_4_data visualization.pptxUNIT_4_data visualization.pptx
UNIT_4_data visualization.pptx
BhagyasriPatel2
 
Data visualization using R
Data visualization using RData visualization using R
Data visualization using R
Ummiya Mohammedi
 
Statistical Graphics / Exploratory Data Analysis - DAY 2 - 8614 - B.Ed - AIOU
Statistical Graphics / Exploratory Data Analysis - DAY 2 - 8614 - B.Ed - AIOUStatistical Graphics / Exploratory Data Analysis - DAY 2 - 8614 - B.Ed - AIOU
Statistical Graphics / Exploratory Data Analysis - DAY 2 - 8614 - B.Ed - AIOU
EqraBaig
 
DA_THEORY_PPT DA_THEORY_PPT DA_THEORY_PPT
DA_THEORY_PPT DA_THEORY_PPT DA_THEORY_PPTDA_THEORY_PPT DA_THEORY_PPT DA_THEORY_PPT
DA_THEORY_PPT DA_THEORY_PPT DA_THEORY_PPT
20harish08
 
R and Visualization: A match made in Heaven
R and Visualization: A match made in HeavenR and Visualization: A match made in Heaven
R and Visualization: A match made in Heaven
Edureka!
 
An implementation of the grammar of graphics: ggplot
An implementation of the grammar of graphics: ggplotAn implementation of the grammar of graphics: ggplot
An implementation of the grammar of graphics: ggplot
Hoffman Lab
 
M4_DAR_part1. module part 4 analystics with r
M4_DAR_part1. module part 4 analystics with rM4_DAR_part1. module part 4 analystics with r
M4_DAR_part1. module part 4 analystics with r
LalithauLali
 
R and Visualization: A match made in Heaven
R and Visualization: A match made in HeavenR and Visualization: A match made in Heaven
R and Visualization: A match made in Heaven
Edureka!
 
Introduction to R Short course Fall 2016
Introduction to R Short course Fall 2016Introduction to R Short course Fall 2016
Introduction to R Short course Fall 2016
Spencer Fox
 
r studio presentation.pptx
r studio presentation.pptxr studio presentation.pptx
r studio presentation.pptx
DevikaRaj14
 
r studio presentation.pptx
r studio presentation.pptxr studio presentation.pptx
r studio presentation.pptx
DevikaRaj14
 
Introduction to Data Visualization for Agriculture and Allied Sciences using ...
Introduction to Data Visualization for Agriculture and Allied Sciences using ...Introduction to Data Visualization for Agriculture and Allied Sciences using ...
Introduction to Data Visualization for Agriculture and Allied Sciences using ...
Shubham Shah
 
Q plot tutorial
Q plot tutorialQ plot tutorial
Q plot tutorial
Abhik Seal
 
TID Chapter 5 Introduction To Charts And Graph
TID Chapter 5 Introduction To Charts And GraphTID Chapter 5 Introduction To Charts And Graph
TID Chapter 5 Introduction To Charts And Graph
WanBK Leo
 
Data Visualization in R (Graph, Trend, etc)
Data Visualization in R (Graph, Trend, etc)Data Visualization in R (Graph, Trend, etc)
Data Visualization in R (Graph, Trend, etc)
Rudyansyah -
 
Introduction to GGVIS Visualization
Introduction to GGVIS VisualizationIntroduction to GGVIS Visualization
Introduction to GGVIS Visualization
HemantSingh311
 

More from MuhammadjunaidgulMuh1 (9)

unit 7 unit 6.unit 6.unit 6.unit 6. .pptx
unit 7 unit 6.unit 6.unit 6.unit 6.   .pptxunit 7 unit 6.unit 6.unit 6.unit 6.   .pptx
unit 7 unit 6.unit 6.unit 6.unit 6. .pptx
MuhammadjunaidgulMuh1
 
unit 6 unit 6.unit 6. unit 6unit 6. . .pptx
unit 6 unit 6.unit 6. unit 6unit 6. .  .pptxunit 6 unit 6.unit 6. unit 6unit 6. .  .pptx
unit 6 unit 6.unit 6. unit 6unit 6. . .pptx
MuhammadjunaidgulMuh1
 
unit Element Element Element 4.pptx
unit Element   Element  Element   4.pptxunit Element   Element  Element   4.pptx
unit Element Element Element 4.pptx
MuhammadjunaidgulMuh1
 
IG1 Element Element 2.pptx (part-1)_4.pptx
IG1 Element  Element 2.pptx (part-1)_4.pptxIG1 Element  Element 2.pptx (part-1)_4.pptx
IG1 Element Element 2.pptx (part-1)_4.pptx
MuhammadjunaidgulMuh1
 
4- Interaction design basics (part-1)_.pdf
4- Interaction design basics (part-1)_.pdf4- Interaction design basics (part-1)_.pdf
4- Interaction design basics (part-1)_.pdf
MuhammadjunaidgulMuh1
 
3- The Interaction Interaction design basics .pptx
3- The Interaction Interaction design basics .pptx3- The Interaction Interaction design basics .pptx
3- The Interaction Interaction design basics .pptx
MuhammadjunaidgulMuh1
 
02Data.ppt 02Data.ppt data mining introduction topic1
02Data.ppt 02Data.ppt data mining introduction topic102Data.ppt 02Data.ppt data mining introduction topic1
02Data.ppt 02Data.ppt data mining introduction topic1
MuhammadjunaidgulMuh1
 
02Data.ppt data mining introduction topic
02Data.ppt data mining introduction topic02Data.ppt data mining introduction topic
02Data.ppt data mining introduction topic
MuhammadjunaidgulMuh1
 
01Intro.ppt data analytics r language slide 1
01Intro.ppt data analytics r language  slide 101Intro.ppt data analytics r language  slide 1
01Intro.ppt data analytics r language slide 1
MuhammadjunaidgulMuh1
 
unit 7 unit 6.unit 6.unit 6.unit 6. .pptx
unit 7 unit 6.unit 6.unit 6.unit 6.   .pptxunit 7 unit 6.unit 6.unit 6.unit 6.   .pptx
unit 7 unit 6.unit 6.unit 6.unit 6. .pptx
MuhammadjunaidgulMuh1
 
unit 6 unit 6.unit 6. unit 6unit 6. . .pptx
unit 6 unit 6.unit 6. unit 6unit 6. .  .pptxunit 6 unit 6.unit 6. unit 6unit 6. .  .pptx
unit 6 unit 6.unit 6. unit 6unit 6. . .pptx
MuhammadjunaidgulMuh1
 
IG1 Element Element 2.pptx (part-1)_4.pptx
IG1 Element  Element 2.pptx (part-1)_4.pptxIG1 Element  Element 2.pptx (part-1)_4.pptx
IG1 Element Element 2.pptx (part-1)_4.pptx
MuhammadjunaidgulMuh1
 
4- Interaction design basics (part-1)_.pdf
4- Interaction design basics (part-1)_.pdf4- Interaction design basics (part-1)_.pdf
4- Interaction design basics (part-1)_.pdf
MuhammadjunaidgulMuh1
 
3- The Interaction Interaction design basics .pptx
3- The Interaction Interaction design basics .pptx3- The Interaction Interaction design basics .pptx
3- The Interaction Interaction design basics .pptx
MuhammadjunaidgulMuh1
 
02Data.ppt 02Data.ppt data mining introduction topic1
02Data.ppt 02Data.ppt data mining introduction topic102Data.ppt 02Data.ppt data mining introduction topic1
02Data.ppt 02Data.ppt data mining introduction topic1
MuhammadjunaidgulMuh1
 
02Data.ppt data mining introduction topic
02Data.ppt data mining introduction topic02Data.ppt data mining introduction topic
02Data.ppt data mining introduction topic
MuhammadjunaidgulMuh1
 
01Intro.ppt data analytics r language slide 1
01Intro.ppt data analytics r language  slide 101Intro.ppt data analytics r language  slide 1
01Intro.ppt data analytics r language slide 1
MuhammadjunaidgulMuh1
 
Ad

Recently uploaded (20)

Odoo 18 Point of Sale PWA - Odoo Slides
Odoo 18 Point of Sale PWA  - Odoo  SlidesOdoo 18 Point of Sale PWA  - Odoo  Slides
Odoo 18 Point of Sale PWA - Odoo Slides
Celine George
 
How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18
Celine George
 
LDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College VolumeLDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College Volume
LDM & Mia eStudios
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptxColeoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
How to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRMHow to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRM
Celine George
 
Writing Research Papers: Guidance for Research Community
Writing Research Papers: Guidance for Research CommunityWriting Research Papers: Guidance for Research Community
Writing Research Papers: Guidance for Research Community
Rishi Bankim Chandra Evening College, Naihati, North 24 Parganas, West Bengal, India
 
K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910
PankajRodey1
 
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGYHUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
DHARMENDRA SAHU
 
A Brief Introduction About Jack Lutkus
A Brief Introduction About  Jack  LutkusA Brief Introduction About  Jack  Lutkus
A Brief Introduction About Jack Lutkus
Jack Lutkus
 
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar SirPHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
Diwakar Kashyap
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
Types of Actions in Odoo 18 - Odoo Slides
Types of Actions in Odoo 18 - Odoo SlidesTypes of Actions in Odoo 18 - Odoo Slides
Types of Actions in Odoo 18 - Odoo Slides
Celine George
 
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly WorkshopsLDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDM & Mia eStudios
 
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdfপ্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
Pragya - UEM Kolkata Quiz Club
 
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based EducatorDiana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda
 
State institute of educational technology
State institute of educational technologyState institute of educational technology
State institute of educational technology
vp5806484
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ..."Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
Arshad Shaikh
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Exploring Identity Through Colombian Companies
Exploring Identity Through Colombian CompaniesExploring Identity Through Colombian Companies
Exploring Identity Through Colombian Companies
OlgaLeonorTorresSnch
 
Odoo 18 Point of Sale PWA - Odoo Slides
Odoo 18 Point of Sale PWA  - Odoo  SlidesOdoo 18 Point of Sale PWA  - Odoo  Slides
Odoo 18 Point of Sale PWA - Odoo Slides
Celine George
 
How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18
Celine George
 
LDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College VolumeLDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College Volume
LDM & Mia eStudios
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptxColeoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
How to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRMHow to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRM
Celine George
 
K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910
PankajRodey1
 
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGYHUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
DHARMENDRA SAHU
 
A Brief Introduction About Jack Lutkus
A Brief Introduction About  Jack  LutkusA Brief Introduction About  Jack  Lutkus
A Brief Introduction About Jack Lutkus
Jack Lutkus
 
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar SirPHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
Diwakar Kashyap
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
Types of Actions in Odoo 18 - Odoo Slides
Types of Actions in Odoo 18 - Odoo SlidesTypes of Actions in Odoo 18 - Odoo Slides
Types of Actions in Odoo 18 - Odoo Slides
Celine George
 
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly WorkshopsLDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDM & Mia eStudios
 
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdfপ্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
Pragya - UEM Kolkata Quiz Club
 
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based EducatorDiana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda
 
State institute of educational technology
State institute of educational technologyState institute of educational technology
State institute of educational technology
vp5806484
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ..."Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
Arshad Shaikh
 
Exploring Identity Through Colombian Companies
Exploring Identity Through Colombian CompaniesExploring Identity Through Colombian Companies
Exploring Identity Through Colombian Companies
OlgaLeonorTorresSnch
 
Ad

R programming.pptx r language easy concept

  • 1. Presentation Presented By Momna Fatima Reg No: 2277 Bs IT (Evening) 7th Sem
  • 3. History of R Language
  • 4. Features of R Language
  • 5. Features of R Language
  • 6. Reasons to Learn R Language
  • 10. R – graph: R language is mostly used for statistics and data analytics purposes to represent the data graphically in the software. To represent those data graphically, charts and graphs are used in R. There are hundreds of charts and graphs present in R. For example, bar plots, box plots, mosaic plots, dot charts, coplot, histograms, pie charts, scatter graphs, etc. Types of R – Charts • Pie Diagram or Pie Chart • Bar Plot or Bar Chart • Histogram • Scatter Plot
  • 11. Pie Diagram or Pie Chart The pie chart is a circular chart divided into different segments according to the ratio of data provided. The total value of the pie is 100 and the segments tell the fraction of the whole pie. It is another method to represent statistical data in graphical form and the pie() function is used to perform the same. Syntax: pie(x, labels, col, main, radius) where, • x is the data vector • labels show names given to slices • col fills the color in the slices as the given parameter • main shows the title name of the pie chart Example: # Create a vector of pies x <- c(10,20,30,40) # Create a vector of labels mylabel <- c("Apples", "Bananas", "Cherries", "Dates") # Display the pie chart with labels pie(x, label = mylabel, main = "Fruits") Out Put: You can add a color to each pie with the col parameter: # Create a vector of colors colors<- c("blue", "yellow", "green", "black") # Display the pie chart with colors pie(x, label = mylabel, main = "Fruits", col = colors)
  • 12. Legend To add a list of explanations for each pie, use the legend() function: Example: # Create a vector of labels mylabel <- c("Apples", "Bananas", "Cherries", "Dates") # Create a vector of colors colors <- c("blue", "yellow", "green", "black") # Display the pie chart with colors pie(x, label = mylabel, main = "Pie Chart", col = colors) # Display the explanation box legend("bottomright", mylabel, fill = colors) The legend can be positioned as either: bottomright, bottom, bottomleft, left, topleft, top, topright, right, center Out Put:
  • 13. Bar Charts A bar chart uses rectangular bars to visualize data. A bar chart represents data in rectangular bars with the length of the bar proportional to the value of the variable. R uses the function barplot() to create bar charts. Syntax: barplot(data, xlab, ylab) where: • data is the data vector to be represented on the y-axis • xlab is the label given to the x-axis • ylab is the label given to the y-axis • names. arg defines the names of each observation in the x- axis Example: x <- c(“Jan", “Feb", “March", “April") y <- c(2, 4, 6, 8) barplot(y,name.args = x, col = "yellow", xlab = "Month", ylab = "Revenue", border = "red“, main = "Revenue bar chart") Out Put:
  • 14. Histogram: A histogram is a graphical representation used to create a graph with bars representing the frequency of grouped data in a vector. The histogram is the same as a bar chart, but the only difference is that it represents the frequency of grouped data rather than the data itself. Syntax: hist(x, col, border, main, xlab, ylab) where: • x is the data vector • col specifies the color of the bars to be filled • border specifies the color of the border of bars • main specifies the title name of the histogram • xlab specifies the x-axis label • ylab specifies the y-axis label • xlim: is used to specify the range of values on the x-axis. • ylim: is used to specify the range of values on the y-axis. Example: v <- c(12, 24, 16, 38, 21, 13, 55, 17, 39, 10, 60, 59, 58) hist(v, col = “green", xlab = “weight“ , ylab = “Frequency", border = "red“, main = “Frequency bar chart“, ylim = c (0,5), xlim =c (10,60)) Out put:
  • 15. Scatter plot: A "scatter plot" is a type of plot used to display the relationship between two numerical variables, and plots one dot for each observation. It needs two vectors of the same length, one for the x-axis (horizontal) and one for the y-axis (vertical).a Syntax: plot(x, y, type, xlab, ylab, main) Where, • x is the data vector represented on the x-axis • y is the data vector represented on the y-axis • xlab specifies the label for the x-axis • ylab specifies the label for the y-axis • main specifies the title name of the graph • xlim: This parameter is used for plotting values of x. • ylim: This parameter is used for plotting values of y. Example: x <- c(5,7,8,7,2,2,9,4,11,12,9,6) y <- c(99,86,87,88,111,103,87,94,78,77,85,86) plot(x, y, main="Observation of Cars", xlab="Car age", ylab="Car speed“ , xlim = c(2,12), ylim = c(80,5 ) To recap, the observation in the example above is the result of 12 cars passing by. Out Put: The x-axis shows how old the car is. The y-axis shows the speed of the car when it passes. Are there any relationships between the observations? It seems that the newer the car, the faster it drives.