17
Presentation On R Programming Prepared By – Abhishek Pratap Singh B.Tech. I.T. – 4 th Sem. Roll No. 03 Presented To – Mr. Ashu Sharma

R Programming

Embed Size (px)

Citation preview

Page 1: R Programming

PresentationOnR

Programming

Prepared By –Abhishek Pratap SinghB.Tech. I.T. – 4th Sem.Roll No. 03

Presented To –Mr. Ashu Sharma

Page 2: R Programming

WEBSITEedX

www.edx.org

Trainer: Mr. Filip Schounwenaars

Page 3: R Programming

What is R ?• Language for Statistical Computing• Ihaka & Gentleman• Auckland, New Zealand• Open-source implementation of S• Statistical Techniques• Visualization Capabilities• Highly Extensible

Page 4: R Programming

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.

Page 5: R Programming

Why R?

Page 6: R Programming

Module - 1R: The True Basics

What is R?

Advantages &

Disadvantages

Console

Variables

Workspace

R Scripts

Comments #

Page 7: R Programming

Module - 2Basic Data Types

Logical

Numeric

Character

Other Atomic Types

Coercion

Page 8: R Programming

Module – 3Create And Name Vectors

Vector

Create a Vector

Name a Vector

Single Value = Vector

Vectors are

Homogenous

Coercion for Vectors

Page 9: R Programming

Module - 4Vector Arithmetic

Vector Arithmetic

Element-wise

‘sum( )’ and ‘>’

Operations

Page 10: R Programming

Module - 5Subsetting vectors

Subset by Index

Subset by Name

Subset Multiple

Elements

Subset All but Some

Subset using Logical

Vectors

Page 11: R Programming

Module - 6Create & Name Matrices

Matrix

Create a Matrix:

matrix ( )

Create a Matrix:

Recycling

‘rbind( )’ , ‘cbind( )’

Naming a Matrix:

‘rownames( )’,

‘colnames( )’

Page 12: R Programming

Module – 7Subsetting Matrices

Subset Element

Subset Multiple

Elements

Subset by Name

Subset by Logicals

Subsetting Cautions

Page 13: R Programming

Module - 8Matrix Arithmetic

Matrix Arithmetic

‘lotr_matrix’

Matrix – Scalar

Matrix – Matrix

Recycling

Matrix Multiplication

Matrices and Vectors

Page 14: R Programming

Module - 9Factors

Categorical Variables

Create Vector:

factor( )

Order Levels

Differently

Rename Factor Levels

Nominal versus

Ordinal

Ordered Vector

Wrap Up

Page 15: R Programming

Module - 10Create and Name Lists

Vector - Matrix - List

Create a List

‘list ( )’

Name List

‘str( )’

List in List

Page 16: R Programming

Module - 11Subset And Extend List

Subsetting Lists

‘[’ versus ‘[[’

Subset by Names

Subset by Logicals

‘$’ and Extending

Extending Lists

Wrap UP

Page 17: R Programming

ThankYou