Description
This course will teach you how to programme in R as well as how to use R for effective data analysis. You'll learn how to instal and configure the software required for a statistical programming environment, as well as how to describe generic programming language concepts as they're implemented in a high-level statistical language. The course covers practical issues in statistical computing such as programming in R, reading data into R, accessing R packages, writing R functions, debugging, profiling R code, organising and commenting R code, and so on. Working examples will be provided by topics in statistical data analysis.
Syllabus :
1. Background, Getting Started, and Nuts & Bolts
- Installing R on a Mac
- Installing R on Windows
- Installing R Studio (Mac)
- Writing Code / Setting Your Working Directory (Windows)
- Writing Code / Setting Your Working Directory (Mac)
- Introduction
- Overview and History of R
- Getting Help
- R Console Input and Evaluation
- Data Types - R Objects and Attributes
- Data Types - Vectors and Lists
- Data Types - Matrices
- Data Types - Factors
- Data Types - Missing Values
- Data Types - Data Frames
- Data Types - Names Attribute
- Data Types - Summary
- Reading Tabular Data
- Reading Large Tables
- Textual Data Formats
- Connections: Interfaces to the Outside World
- Subsetting - Basics
- Subsetting - Lists
- Subsetting - Matrices
- Subsetting - Partial Matching
- Subsetting - Removing Missing Values
- Vectorized Operations
- Introduction to swirl
2. Programming with R
- Control Structures - Introduction
- Control Structures - If-else
- Control Structures - For loops
- Control Structures - While loops
- Control Structures - Repeat, Next, Break
- Your First R Function
- Functions (part 1)
- Functions (part 2)
- Scoping Rules - Symbol Binding
- Scoping Rules - R Scoping Rules
- Scoping Rules - Optimization Example (OPTIONAL)
- Coding Standards
- Dates and Times
3. Loop Functions and Debugging
- Loop Functions - lapply
- Loop Functions - apply
- Loop Functions - mapply
- Loop Functions - tapply
- Loop Functions - split
- Debugging Tools - Diagnosing the Problem
- Debugging Tools - Basic Tools
- Debugging Tools - Using the Tools
4. Simulation & Profiling
- The str Function
- Simulation - Generating Random Numbers
- Simulation - Simulating a Linear Model
- Simulation - Random Sampling
- R Profiler