Upload
abhishek-pratap-singh
View
87
Download
1
Embed Size (px)
Citation preview
PresentationOnR
Programming
Prepared By –Abhishek Pratap SinghB.Tech. I.T. – 4th Sem.Roll No. 03
Presented To –Mr. Ashu Sharma
WEBSITEedX
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 - 1R: The True Basics
What is R?
Advantages &
Disadvantages
Console
Variables
Workspace
R Scripts
Comments #
Module - 2Basic Data Types
Logical
Numeric
Character
Other Atomic Types
Coercion
Module – 3Create And Name Vectors
Vector
Create a Vector
Name a Vector
Single Value = Vector
Vectors are
Homogenous
Coercion for Vectors
Module - 4Vector Arithmetic
Vector Arithmetic
Element-wise
‘sum( )’ and ‘>’
Operations
Module - 5Subsetting vectors
Subset by Index
Subset by Name
Subset Multiple
Elements
Subset All but Some
Subset using Logical
Vectors
Module - 6Create & Name Matrices
Matrix
Create a Matrix:
matrix ( )
Create a Matrix:
Recycling
‘rbind( )’ , ‘cbind( )’
Naming a Matrix:
‘rownames( )’,
‘colnames( )’
Module – 7Subsetting Matrices
Subset Element
Subset Multiple
Elements
Subset by Name
Subset by Logicals
Subsetting Cautions
Module - 8Matrix Arithmetic
Matrix Arithmetic
‘lotr_matrix’
Matrix – Scalar
Matrix – Matrix
Recycling
Matrix Multiplication
Matrices and Vectors
Module - 9Factors
Categorical Variables
Create Vector:
factor( )
Order Levels
Differently
Rename Factor Levels
Nominal versus
Ordinal
Ordered Vector
Wrap Up
Module - 10Create and Name Lists
Vector - Matrix - List
Create a List
‘list ( )’
Name List
‘str( )’
List in List
Module - 11Subset And Extend List
Subsetting Lists
‘[’ versus ‘[[’
Subset by Names
Subset by Logicals
‘$’ and Extending
Extending Lists
Wrap UP
ThankYou