SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Introduction to R
•   http://cran.r-project.org/
•   The Comprehensive R Archive Network
•   The Base System
•   The idea of Packages
•   Open source Implementation of S
•   Commercial implementation is S Plus

                -Sujoy Bhattacharya
• Default Prompt is ‘>’
• setwd("C:/Documents and
  Settings/USER/My Documents")
• getwd()
• ?(plot)
• R is case sensitive
• Objects in R: variables, arrays of numbers,
  character strings, functions .
• function c()
• assignment operator (‘<-’)
• Create an object z such that: x=1 to 20,
  y= 30 to 35, z= concatenation of x and y
• common arithmetic functions: log, exp, sin,
  cos, tan, sqrt
• range()
• mean(y)=sum(y)/ length(y)
• sort(object): elements are arranged in
  increasing order
•   seq(from=5, to=50)
•   seq(-4, 4, by=.1)
•   z<- rep(x, times=4)
•   rep(x, each=4)
Logical Vectors
•   values :TRUE, FALSE, and NA
•   <, <=, >, >=, ==(equality) != ( inequality)
•   z <- x > 20
•   z1 & z2 (intersection)
•   z1 | z2 (union)
•   !z negation of z
•   NA and NaN
•   Do 0/0 and z<- c(2,5,NA)
•   Operations on NA are NA
•   Do z<- c(1:100,NA)
•   t<- 100*z
•   Arrays: dim(z) <- c(3,2,2)
•   z[1,1,1]
•   While entering data match length
•   z[1,1,]
•   z <- array(1:20, dim=c(4,5))
•   Z <- array(data_vector, dim_vector)
•   object <- array(data_vector, dim_vector)
•   dd <- array(data=c(1:125),c(5,5,5))
•   cbind() and rbind()
•   z<- cbind(c(1:10),c(1:5))
•   transpose of an array: t(z)
•   Matrix product : x %*% y
• x<- array(data=c(1:6),c(2,3))
• Matrix inversion :solve(z)
• x<- cbind(1, y, z): y,z must have equal
  rows.
•   read.csv(file.choose(), header=T)
•   reg1 <- lm(y ~ x1 + x2, data = nse)
•   plot(object)
•   residuals(object)
•   plot(x, y)
R communities
• www.r-project.org
• www.r-forge.r-project.org
• www.rstudio.com

Weitere ähnliche Inhalte

Was ist angesagt?

The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 44 of 189
The Ring programming language version 1.6 book - Part 44 of 189The Ring programming language version 1.6 book - Part 44 of 189
The Ring programming language version 1.6 book - Part 44 of 189Mahmoud Samir Fayed
 
Brief intro to clojure
Brief intro to clojureBrief intro to clojure
Brief intro to clojureRoy Rutto
 
ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changeshayato
 
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...Heroku
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsKandarp Tiwari
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignmentashikul akash
 
Single page-integral-table
Single page-integral-tableSingle page-integral-table
Single page-integral-tableMonique Anderson
 
Visualization team presentation
Visualization team presentation Visualization team presentation
Visualization team presentation madhobilota
 
Integral table
Integral tableIntegral table
Integral tablezzzubair
 
Integral table
Integral tableIntegral table
Integral tablebags07
 

Was ist angesagt? (19)

The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196
 
The Ring programming language version 1.6 book - Part 44 of 189
The Ring programming language version 1.6 book - Part 44 of 189The Ring programming language version 1.6 book - Part 44 of 189
The Ring programming language version 1.6 book - Part 44 of 189
 
Brief intro to clojure
Brief intro to clojureBrief intro to clojure
Brief intro to clojure
 
ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changes
 
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 
Numpy python cheat_sheet
Numpy python cheat_sheetNumpy python cheat_sheet
Numpy python cheat_sheet
 
Software Design Thinking
Software Design ThinkingSoftware Design Thinking
Software Design Thinking
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignment
 
Single page-integral-table
Single page-integral-table Single page-integral-table
Single page-integral-table
 
Single page-integral-table
Single page-integral-tableSingle page-integral-table
Single page-integral-table
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
CLUSTERGRAM
CLUSTERGRAMCLUSTERGRAM
CLUSTERGRAM
 
Visualization team presentation
Visualization team presentation Visualization team presentation
Visualization team presentation
 
Integral table
Integral tableIntegral table
Integral table
 
Integral table
Integral tableIntegral table
Integral table
 
Tabla integrales
Tabla integralesTabla integrales
Tabla integrales
 
Python programing
Python programingPython programing
Python programing
 
Integral table
Integral tableIntegral table
Integral table
 

Andere mochten auch

Comprehensive R Arichive Network (CRAN)
Comprehensive R Arichive Network (CRAN)Comprehensive R Arichive Network (CRAN)
Comprehensive R Arichive Network (CRAN)Kamakshaiah M
 
What's New in AutoCAD Electrical 2010
What's New in AutoCAD Electrical 2010What's New in AutoCAD Electrical 2010
What's New in AutoCAD Electrical 2010Applied Engineering
 
E nodeb commissioning guide(v100r005c00 04)(pdf)-en
E nodeb commissioning guide(v100r005c00 04)(pdf)-enE nodeb commissioning guide(v100r005c00 04)(pdf)-en
E nodeb commissioning guide(v100r005c00 04)(pdf)-enVugar Ali
 
DWDM Presentation
DWDM PresentationDWDM Presentation
DWDM Presentationayodejieasy
 
140556299 huawei-node b-data-configuration
140556299 huawei-node b-data-configuration140556299 huawei-node b-data-configuration
140556299 huawei-node b-data-configurationShelton Siziba
 
The Huawei Node B Evolution
The Huawei Node B EvolutionThe Huawei Node B Evolution
The Huawei Node B EvolutionAtif Mahmood
 
HOME WIRING(domestic wiring)
HOME WIRING(domestic wiring)HOME WIRING(domestic wiring)
HOME WIRING(domestic wiring)Arshad Hussain
 
Presentation about Fiber Optics
Presentation about Fiber OpticsPresentation about Fiber Optics
Presentation about Fiber OpticsAbidullah Zarghoon
 
optical fibre ppt for download visit http://nowcracktheworld.blogspot.in/
optical fibre  ppt for download visit http://nowcracktheworld.blogspot.in/optical fibre  ppt for download visit http://nowcracktheworld.blogspot.in/
optical fibre ppt for download visit http://nowcracktheworld.blogspot.in/Ram Niwas Bajiya
 
Introduction to Building Wireframes (with OmniGraffle)
Introduction to Building Wireframes (with OmniGraffle)Introduction to Building Wireframes (with OmniGraffle)
Introduction to Building Wireframes (with OmniGraffle)Erin 'Folletto' Casali
 
OTN for Beginners
OTN for BeginnersOTN for Beginners
OTN for BeginnersMapYourTech
 

Andere mochten auch (12)

Comprehensive R Arichive Network (CRAN)
Comprehensive R Arichive Network (CRAN)Comprehensive R Arichive Network (CRAN)
Comprehensive R Arichive Network (CRAN)
 
What's New in AutoCAD Electrical 2010
What's New in AutoCAD Electrical 2010What's New in AutoCAD Electrical 2010
What's New in AutoCAD Electrical 2010
 
E nodeb commissioning guide(v100r005c00 04)(pdf)-en
E nodeb commissioning guide(v100r005c00 04)(pdf)-enE nodeb commissioning guide(v100r005c00 04)(pdf)-en
E nodeb commissioning guide(v100r005c00 04)(pdf)-en
 
DWDM Presentation
DWDM PresentationDWDM Presentation
DWDM Presentation
 
140556299 huawei-node b-data-configuration
140556299 huawei-node b-data-configuration140556299 huawei-node b-data-configuration
140556299 huawei-node b-data-configuration
 
The Huawei Node B Evolution
The Huawei Node B EvolutionThe Huawei Node B Evolution
The Huawei Node B Evolution
 
HOME WIRING(domestic wiring)
HOME WIRING(domestic wiring)HOME WIRING(domestic wiring)
HOME WIRING(domestic wiring)
 
Presentation about Fiber Optics
Presentation about Fiber OpticsPresentation about Fiber Optics
Presentation about Fiber Optics
 
optical fibre ppt for download visit http://nowcracktheworld.blogspot.in/
optical fibre  ppt for download visit http://nowcracktheworld.blogspot.in/optical fibre  ppt for download visit http://nowcracktheworld.blogspot.in/
optical fibre ppt for download visit http://nowcracktheworld.blogspot.in/
 
Electrical Wiring Practices and Diagrams
Electrical Wiring Practices and DiagramsElectrical Wiring Practices and Diagrams
Electrical Wiring Practices and Diagrams
 
Introduction to Building Wireframes (with OmniGraffle)
Introduction to Building Wireframes (with OmniGraffle)Introduction to Building Wireframes (with OmniGraffle)
Introduction to Building Wireframes (with OmniGraffle)
 
OTN for Beginners
OTN for BeginnersOTN for Beginners
OTN for Beginners
 

Ähnlich wie Introduction to R

Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)Chia-Chi Chang
 
Introduction to R.pptx
Introduction to R.pptxIntroduction to R.pptx
Introduction to R.pptxkarthikks82
 
An overview of Python 2.7
An overview of Python 2.7An overview of Python 2.7
An overview of Python 2.7decoupled
 
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov VyacheslavSeminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov VyacheslavVyacheslav Arbuzov
 
Data Analysis and Programming in R
Data Analysis and Programming in RData Analysis and Programming in R
Data Analysis and Programming in REshwar Sai
 
On Beyond (PostgreSQL) Data Types
On Beyond (PostgreSQL) Data TypesOn Beyond (PostgreSQL) Data Types
On Beyond (PostgreSQL) Data TypesJonathan Katz
 
Python 101 language features and functional programming
Python 101 language features and functional programmingPython 101 language features and functional programming
Python 101 language features and functional programmingLukasz Dynowski
 
Data analysis with R
Data analysis with RData analysis with R
Data analysis with RShareThis
 

Ähnlich wie Introduction to R (20)

Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)
 
Introduction to R.pptx
Introduction to R.pptxIntroduction to R.pptx
Introduction to R.pptx
 
Big datacourse
Big datacourseBig datacourse
Big datacourse
 
An overview of Python 2.7
An overview of Python 2.7An overview of Python 2.7
An overview of Python 2.7
 
A tour of Python
A tour of PythonA tour of Python
A tour of Python
 
R language, an introduction
R language, an introductionR language, an introduction
R language, an introduction
 
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov VyacheslavSeminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Ggplot2 v3
Ggplot2 v3Ggplot2 v3
Ggplot2 v3
 
Data Analysis and Programming in R
Data Analysis and Programming in RData Analysis and Programming in R
Data Analysis and Programming in R
 
8150.graphs
8150.graphs8150.graphs
8150.graphs
 
On Beyond (PostgreSQL) Data Types
On Beyond (PostgreSQL) Data TypesOn Beyond (PostgreSQL) Data Types
On Beyond (PostgreSQL) Data Types
 
Lec3
Lec3Lec3
Lec3
 
Rug hogan-10-03-2012
Rug hogan-10-03-2012Rug hogan-10-03-2012
Rug hogan-10-03-2012
 
Python 101 language features and functional programming
Python 101 language features and functional programmingPython 101 language features and functional programming
Python 101 language features and functional programming
 
Data analysis with R
Data analysis with RData analysis with R
Data analysis with R
 
Week7
Week7Week7
Week7
 
Lec2
Lec2Lec2
Lec2
 
Tutorial matlab
Tutorial matlabTutorial matlab
Tutorial matlab
 
Tutorialmatlab kurniawan.s
Tutorialmatlab kurniawan.sTutorialmatlab kurniawan.s
Tutorialmatlab kurniawan.s
 

Kürzlich hochgeladen

Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...lizamodels9
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 DelhiCall Girls in Delhi
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdftbatkhuu1
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insightsseri bangash
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Delhi Call girls
 
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...Suhani Kapoor
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 

Kürzlich hochgeladen (20)

Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdf
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insights
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 

Introduction to R

  • 1. Introduction to R • http://cran.r-project.org/ • The Comprehensive R Archive Network • The Base System • The idea of Packages • Open source Implementation of S • Commercial implementation is S Plus -Sujoy Bhattacharya
  • 2. • Default Prompt is ‘>’ • setwd("C:/Documents and Settings/USER/My Documents") • getwd() • ?(plot) • R is case sensitive
  • 3. • Objects in R: variables, arrays of numbers, character strings, functions . • function c() • assignment operator (‘<-’) • Create an object z such that: x=1 to 20, y= 30 to 35, z= concatenation of x and y
  • 4. • common arithmetic functions: log, exp, sin, cos, tan, sqrt • range() • mean(y)=sum(y)/ length(y) • sort(object): elements are arranged in increasing order
  • 5. seq(from=5, to=50) • seq(-4, 4, by=.1) • z<- rep(x, times=4) • rep(x, each=4)
  • 6. Logical Vectors • values :TRUE, FALSE, and NA • <, <=, >, >=, ==(equality) != ( inequality) • z <- x > 20 • z1 & z2 (intersection) • z1 | z2 (union) • !z negation of z
  • 7. NA and NaN • Do 0/0 and z<- c(2,5,NA) • Operations on NA are NA • Do z<- c(1:100,NA) • t<- 100*z
  • 8. Arrays: dim(z) <- c(3,2,2) • z[1,1,1] • While entering data match length • z[1,1,] • z <- array(1:20, dim=c(4,5)) • Z <- array(data_vector, dim_vector)
  • 9. object <- array(data_vector, dim_vector) • dd <- array(data=c(1:125),c(5,5,5)) • cbind() and rbind() • z<- cbind(c(1:10),c(1:5)) • transpose of an array: t(z) • Matrix product : x %*% y
  • 10. • x<- array(data=c(1:6),c(2,3)) • Matrix inversion :solve(z) • x<- cbind(1, y, z): y,z must have equal rows.
  • 11. read.csv(file.choose(), header=T) • reg1 <- lm(y ~ x1 + x2, data = nse) • plot(object) • residuals(object) • plot(x, y)
  • 12. R communities • www.r-project.org • www.r-forge.r-project.org • www.rstudio.com