Section 1
##### What is R?

Section 2
##### Basic Operations in R

1

Expressions: Basic Idea

2

Constant Values: Numeric and Non-Numeric

3

Arithmetic: Operations and BODMAS

4

Conditions: Equality, Greater Than, Less Than, etc

5

Function Calls: Introduction to R Functions

6

Symbols and Assignment

7

Keywords: NA, Inf, NaN, NULL, TRUE, FALSE

8

Naming a Variable: Generally accepted conventions

Section 3
##### Data Types and Data Structures

Section 4
##### Subsetting in R

1

Vector Subsetting

2

c() function: Creation of Vectors

3

Using rep() and seq() functions

4

Using factor() to covert vectors to factors

5

Using data.frame() to create data frames

6

Meta data access: dimnames(), rownames(), colnames()

7

Using matrix() to create matrices

8

Using array() to create arrays

9

Subsetting data frames: row subset, column subset, using subset() function

10

Assigning to a subset

11

Using is.na() to detect NA

12

Subsetting factors

Section 5
##### Additional Topics on Data structures

1

The recycling rule: Uneven arithmetic operation on vectors

2

Type coercion: Character to Numeric

3

Automatic Type coercion

4

Coercing factors: Using as.factor() function

5

Changing factor levels

6

Attributes: attribute(), attr(), names() functions

7

Classes: Idea of OOP in R

8

Dates: As a special class

9

Formulas: As a special class

10

Exploring Objects: summary(), str(), dim() functions

11

Generic functions

Section 6
##### Data Import and Export

1

Text formats: Reading Delimited Files

2

read.table() function

3

Using read.fwf() function for fixed width files

4

Using readLines() for reading lines

5

Using write.csv() function to store data as CSV files

6

Reading Excel file: Package XLConnect

7

Reading SPSS file: Package Foreign

8

Reading SAS data file: Package sas7bdat

9

Database connection: The ideas of ODBC connecting in Windows

10

RODBC package: Create and Query database from R

11

Basic SQL

Section 7
##### Control Structures and User Defined Functions

1

Conditional Statements

2

If statement: The Structure

3

If Else statement: The Structure

4

Ifelse() function

5

Iteration

6

The for loop

7

The while loop

8

The repeat statement

9

lapply() function

10

sapply() function

11

apply() function

12

User defined function

13

Variable scooping: Global and Local Variables

14

Using user defined functions inside function definition

Section 8
##### Data Visualisation: Charting with R

1

The plot function

2

plot.new() function: Generating new plot object

3

plot.window() function: Creating window

4

points() function: Plotting points

5

axis() function: Generating Axis

6

box() function: Creating enclosure

7

title() function: Assigning title

8

par() function: Fixing plotting parameters

9

lines() function: Adding connector lines

10

Multi figure layout: Creating multiple charts in the same window

11

hist() function: Plotting histograms

12

Kernel Density Plot: The non-parametric probability distribution

13

Comparing Groups via Kernel Density: Comparing two different probability distributions

14

Simple Bar Plot: Visualizing categorical data

15

Staked Bar Plot: Understating category composition

16

Grouped Bar Plot

17

Line Charts

18

Pie Charts

19

Boxplots: Understanding data distributions and outliers

20

Using Google Chart Tools with R (Package googleVis)

21

Geo Charts

22

Motion Charts

Section 9
##### Visualisation on R using Google Vis

Section 10
##### Visualization in R using GGPLOT2

Graphical User Interface of R

The GUI (Graphical User Interface) that comes with R is widely used. But for different needs we can use different GUIs.

• RStudio: This is the widely used GUI/ IDE (Integrated Development Environment) for R. In our course we will be using this software. RStudio includes a wide range of productivity enhancing features and runs on all major platforms

Features include:

• Customizable workbench with all of the tools required to work with R in one place

• Syntax highlighting editor with code completion.

• Execute code directly from the source editor (line, selection, or file)

• Searchable history.

• Retrieve previous commands.

• Keyboard shortcuts.

• Easy installation of new packages

• Runs on all major platforms and can also be run as a server, enabling multiple users to access the RStudio IDE using a web browser

• Integrated help functionality.

• RStudio works with the manipulate package to add interactive capabilities to standard R plots.

Features include:

• Extensive collection of R packages.

• File Inputs: CSV, TXT, Excel, R Dataset, etc

• Statistics: Min, Max, Quartiles, Mean, St Dev, Missing, Sum, Variance, etc

• Statistical tests: Correlation, t-Test, F-Test, and Wilcoxon Signed Rank.

• Clustering: KMeans, Clara, Hierarchical, and BiCluster.

• Modelling: Decision Trees, Random Forests, Logistic Regression, etc

• Evaluation: Confusion Matrix, Risk Charts, ROC

• Charts: Box Plot, Histogram, Correlations, Dendrograms, Cumulative, etc