L-T- P
CS-403E R PROGRAMMING Cr
3-0-0 3
OBJECTIVE:
To understand the fundamentals of R as a programming language. Learn basic syntax,
operators, data types (vectors, lists, data frames), and control structures (loops, conditionals).
Explore built-in functions for data manipulation.
COURSE OUTCOMES
CO1: Access online resources for R and import new function packages into the R workspace
CO2: Import, review, manipulate and summarize data-sets in R
CO3: Explore data-sets to create testable hypotheses and identify appropriate statistical tests
CO4: Perform appropriate statistical tests using R
CO5: Create and edit visualizations with R
UNIT – I
INTRODUCTION: Overview of R, R data types and objects, reading and writing data, sub
setting R Objects, Essentials of the R Language, Installing R, Running R, Packages in R,
Calculations, Complex numbers in R, Rounding, Arithmetic, Modulo and integer quotients,
Variable names and assignment, Operators, Integers, Factors, Logical operations
UNIT – II
Control structures, functions, scoping rules, dates and times, Introduction to Functions, preview
of Some Important R Data Structures, Vectors, Character Strings, Matrices, Lists, Data Frames,
Classes VECTORS: Generating sequences, Vectors and subscripts, Extracting elements of a
vector using subscripts, Working with logical subscripts, Scalars, Vectors, Arrays, and Matrices,
Adding and Deleting Vector Elements, Obtaining the Length of a Vector, Matrices and Arrays as
Vectors Vector Arithmetic and Logical Operations, Vector Indexing, Common Vector Operation
UNIT – III
LISTS: Creating Lists, General List Operations, List Indexing Adding and Deleting List
Elements, Getting the Size of a List, Extended Example: Text Concordance Accessing List
Components and Values Applying Functions to Lists, DATA FRAMES, Creating Data Frames,
Accessing Data Frames, Other Matrix-Like Operations
UNIT - IV
FACTORS AND TABLES, Factors and Levels, Common Functions Used with Factors, Working
with Tables, Matrix/Array-Like Operations on Tables , Extracting a Subtable, Finding the Largest
Cells in a Table, Math Functions, Calculating a Probability, Cumulative Sums and Products,
Minima and Maxima, Calculus, Functions for Statistical Distributions
UNIT - V
OBJECT-ORIENTED PROGRAMMING: S Classes, S Generic Functions, Writing S Classes,
Using Inheritance, S Classes, Writing S Classes, Implementing a Generic Function on an S
Class, visualization, Simulation, code profiling, Statistical Analysis with R, data manipulation
TEXT BOOKS
1. R Programming for Data Science by Roger [Link] The Art of R Programming by
Prashanthsingh, VivekMourya, CengageLearning India