Prepared By –
Abhishek Pratap Singh
B.Tech. I.T. – 4th Sem.
Roll No. 03
Presented To –
Mr. Ashu Sharma
WEBSITE
edX
www.edx.org
Trainer: Mr. Filip Schounwenaars
What is R?
• Language for Statistical Computing
• Ihaka & Gentleman
• Auckland, New Zealand
• Open-source implementation of S
• Statistical Techniques
• Visualization Capabilities
• Highly Extensible
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.
Why R?
Module - 1
R: The True Basics
What is R?
Advantages &
Disadvantages
Console
Variables
Workspace
R Scripts
Comments #
Module - 2
Basic Data Types
Logical
Numeric
Character
Other Atomic Types
Coercion
Module – 3
Create And Name Vectors
Vector
Create a Vector
Name a Vector
Single Value = Vector
Vectors are
Homogenous
Coercion for Vectors
Module - 4
Vector Arithmetic
Vector Arithmetic
Element-wise
‘sum( )’ and ‘>’
Operations
Module - 5
Subsetting vectors
Subset by Index
Subset by Name
Subset Multiple
Elements
Subset All but Some
Subset using Logical
Vectors
Module - 6
Create & Name Matrices
Matrix
Create a Matrix:
matrix ( )
Create a Matrix:
Recycling
‘rbind( )’ , ‘cbind( )’
Naming a Matrix:
‘rownames( )’,
‘colnames( )’
Module – 7
Subsetting Matrices
Subset Element
Subset Multiple
Elements
Subset by Name
Subset by Logicals
Subsetting Cautions
Module - 8
Matrix Arithmetic
Matrix Arithmetic
‘lotr_matrix’
Matrix – Scalar
Matrix – Matrix
Recycling
Matrix Multiplication
Matrices and Vectors
Module - 9
Factors
Categorical Variables
Create Vector:
factor( )
Order Levels
Differently
Rename Factor Levels
Nominal versus Ordinal
Ordered Vector
Wrap Up
Module - 10
Create and Name Lists
Vector - Matrix - List
Create a List
‘list ( )’
Name List
‘str( )’
List in List
Module - 11
Subset And Extend List
Subsetting Lists
‘[’ versus ‘[[’
Subset by Names
Subset by Logicals
‘$’ and Extending
Extending Lists
Wrap UP
R Programming

R Programming

  • 1.
    Prepared By – AbhishekPratap Singh B.Tech. I.T. – 4th Sem. Roll No. 03 Presented To – Mr. Ashu Sharma
  • 2.
  • 3.
    What is R? •Language for Statistical Computing • Ihaka & Gentleman • Auckland, New Zealand • Open-source implementation of S • Statistical Techniques • Visualization Capabilities • Highly Extensible
  • 4.
    Important features ofR  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.
  • 5.
  • 6.
    Module - 1 R:The True Basics What is R? Advantages & Disadvantages Console Variables Workspace R Scripts Comments #
  • 7.
    Module - 2 BasicData Types Logical Numeric Character Other Atomic Types Coercion
  • 8.
    Module – 3 CreateAnd Name Vectors Vector Create a Vector Name a Vector Single Value = Vector Vectors are Homogenous Coercion for Vectors
  • 9.
    Module - 4 VectorArithmetic Vector Arithmetic Element-wise ‘sum( )’ and ‘>’ Operations
  • 10.
    Module - 5 Subsettingvectors Subset by Index Subset by Name Subset Multiple Elements Subset All but Some Subset using Logical Vectors
  • 11.
    Module - 6 Create& Name Matrices Matrix Create a Matrix: matrix ( ) Create a Matrix: Recycling ‘rbind( )’ , ‘cbind( )’ Naming a Matrix: ‘rownames( )’, ‘colnames( )’
  • 12.
    Module – 7 SubsettingMatrices Subset Element Subset Multiple Elements Subset by Name Subset by Logicals Subsetting Cautions
  • 13.
    Module - 8 MatrixArithmetic Matrix Arithmetic ‘lotr_matrix’ Matrix – Scalar Matrix – Matrix Recycling Matrix Multiplication Matrices and Vectors
  • 14.
    Module - 9 Factors CategoricalVariables Create Vector: factor( ) Order Levels Differently Rename Factor Levels Nominal versus Ordinal Ordered Vector Wrap Up
  • 15.
    Module - 10 Createand Name Lists Vector - Matrix - List Create a List ‘list ( )’ Name List ‘str( )’ List in List
  • 16.
    Module - 11 SubsetAnd Extend List Subsetting Lists ‘[’ versus ‘[[’ Subset by Names Subset by Logicals ‘$’ and Extending Extending Lists Wrap UP