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

Installation of R: Related Websites

Comprehensive R Archive Network (CRAN)

R packages are distributed through CRAN

•CRAN is the repository where the packages are stored, for the users to access it globally.

The Comprehensive R Archive Network is a collection of sites which carry identical material, consisting of the R distribution(s), the contributed extensions, documentation for R, and binaries.

The capabilities of R are extended through user-created packages, which allow specialized statistical techniques, graphical devices, import/export capabilities, reporting tools, etc. These packages are developed primarily in R, and sometimes in Java, C, C++, etc. The R packaging system is also used by researchers to organise research data, code and report files in a systematic way for sharing and public archiving.

A core set of packages is included with the installation of R, with more than 12,500 additional packages available at the Comprehensive R Archive Network (CRAN)

• Installation Guide for R and R-studio

Step 1: Installing R:

1. Download the R installer from https://cran.r-project.org/

2. Run the installer. Default settings are fine.

Step 2: Installing RStudio

1. Download RStudio: https://www.rstudio.com/products/rstudio/download/

2. Once the installation of R has completed successfully (and not before), run the RStudio installer.

3. Download the appropriate archive for your system (Windows/Linux only – the Mac version can be installed into your personal “Applications” folder). Double clicking on the zip archive should automatically unpack it on Windows machines.

Step 3: Check that R and RStudio are working

1. Open RStudio. It should open a window

2. In the left-hand window, by the ‘>’sign, type ‘4+5’ (without the quotes) and hit enter. An output line reading ‘[1] 9’ should appear. This means that R and RStudio are working.