R Programming for Developers

Duration: 3 days

Overview:

Learn how to program by diving into the R language, and then use your newfound skills to solve practical data science problems. With this course you will learn how to load data, assemble and disassemble data objects, navigate R s environment system, write your own functions, and use all of R s programming tools.

Prerequisites:

Previous experience of a programming language or attendance of our R Programming for the Beginner is required for this course.

Topics:

1 – Getting Started

The R User Interface

Objects

Functions

Sample with Replacement

Writing Your Own Functions

The Function Constructor

Arguments

Scripts

2 – Packages and Help Pages

Packages

install.packages

library

Getting Help with Help Pages

Parts of a Help Page

Getting More Help

3 – Atomic Vectors

Doubles

Integers

Characters

Logicals

Complex and Raw

4 – Attributes

Names

Dim

5 – Storing Data

Matrices

Arrays

Class

Dates and Times

Factors

Coercion

Lists

Data Frames

Loading Data

Saving Data

6 – R Notation

Selecting Values

Positive Integers

Negative Integers

Zero

Blank Spaces

Logical Values

Names

Dollar Signs and Double Brackets

7 – Modifying Values

Changing Values in Place

Logical Subsetting

Logical Tests

Boolean Operators

Missing Information

na.rm

is.na

8 – Environments

Environments

Working with Environments

The Active Environment

Scoping Rules

Assignment

Evaluation

Closures

9 – Strategy

Sequential Steps

Parallel Cases

if Statements

else Statements

Lookup Tables

Code Comments

10 – S3

The S3 System

Attributes

Generic Functions

Methods

Method Dispatch

Classes

S3 and Debugging

S4 and R5

11 – Loops

Expected Values

expand.grid

for Loops

while Loops

repeat Loops

12 – Speed

Vectorized Code

How to Write Vectorized Code

How to Write Fast for Loops in R

Vectorized Code in Practice

Loops Versus Vectorized Code