Section 1
##### What is R?

Section 2
##### Basic Operations in R

7

Expressions: Basic Idea

8

Constant Values: Numeric and Non-Numeric

9

Arithmetic: Operations and BODMAS

10

Conditions: Equality, Greater Than, Less Than, etc

11

Function Calls: Introduction to R Functions

12

Symbols and Assignment

13

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

14

Naming a Variable: Generally accepted conventions

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

Section 4
##### Subsetting in R

17

Vector Subsetting

18

c() function: Creation of Vectors

19

Using rep() and seq() functions

20

Using factor() to covert vectors to factors

21

Using data.frame() to create data frames

22

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

23

Using matrix() to create matrices

24

Using array() to create arrays

25

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

26

Assigning to a subset

27

Using is.na() to detect NA

28

Subsetting factors

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

29

The recycling rule: Uneven arithmetic operation on vectors

30

Type coercion: Character to Numeric

31

Automatic Type coercion

32

Coercing factors: Using as.factor() function

33

Changing factor levels

34

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

35

Classes: Idea of OOP in R

36

Dates: As a special class

37

Formulas: As a special class

38

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

39

Generic functions

Section 6
##### Data Import and Export

40

Text formats: Reading Delimited Files

41

read.table() function

42

Using read.fwf() function for fixed width files

43

Using readLines() for reading lines

44

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

45

Reading Excel file: Package XLConnect

46

Reading SPSS file: Package Foreign

47

Reading SAS data file: Package sas7bdat

48

Database connection: The ideas of ODBC connecting in Windows

49

RODBC package: Create and Query database from R

50

Basic SQL

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

51

Conditional Statements

52

If statement: The Structure

53

If Else statement: The Structure

54

Ifelse() function

55

Iteration

56

The for loop

57

The while loop

58

The repeat statement

59

lapply() function

60

sapply() function

61

apply() function

62

User defined function

63

Variable scooping: Global and Local Variables

64

Using user defined functions inside function definition

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

65

The plot function

66

plot.new() function: Generating new plot object

67

plot.window() function: Creating window

68

points() function: Plotting points

69

axis() function: Generating Axis

70

box() function: Creating enclosure

71

title() function: Assigning title

72

par() function: Fixing plotting parameters

73

lines() function: Adding connector lines

74

Multi figure layout: Creating multiple charts in the same window

75

hist() function: Plotting histograms

76

Kernel Density Plot: The non-parametric probability distribution

77

Comparing Groups via Kernel Density: Comparing two different probability distributions

78

Simple Bar Plot: Visualizing categorical data

79

Staked Bar Plot: Understating category composition

80

Grouped Bar Plot

81

Line Charts

82

Pie Charts

83

Boxplots: Understanding data distributions and outliers

84

Using Google Chart Tools with R (Package googleVis)

85

Geo Charts

86

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.