R Programming Introduction Course Outline
Overview
Learn how to perform data analysis with the R language and software environment, even if you have little or no programming experience. With the tutorials in this class, you’ll learn how to use the essential R tools you need to know to analyze data, including data types and programming concepts. The also shows you real data analysis in action by covering everything from importing data to publishing your results.
Audience
This class is for the non-programmer who wants to gain a basic understanding of R.
Prerequisites
No prior programming experience is necessary. Some background in statistics is helpful, but not necessary.
Course Objectives
• Write a simple R program, and discover what the language can do
• Use data types such as vectors, arrays, lists, data frames, and strings
• Execute code conditionally or repeatedly with branches and loops
• Learn R add-on packages
COURSE OUTLINE
The R Language
1. Introduction
What Is R?
Installing R
Choosing an IDE
Emacs + ESS
Eclipse/Architect
RStudio
Revolution-R
Live-R
Other IDEs and Editors
Your First Program
How to Get Help in R
Installing Extra Related Software
2. A Scientific Calculator
Mathematical Operations and Vectors
Assigning Variables
Special Numbers
Logical Vectors
Summary
Test Your Knowledge: Quiz
Test Your Knowledge: Exercises
3. Inspecting Variables and Your Workspace
Classes
Different Types of Numbers
Other Common Classes
Checking and Changing Classes
Examining Variables
The Workspace
4. Vectors, Matrices, and Arrays
Vectors
Sequences
Lengths
Names
Indexing Vectors
Vector Recycling and Repetition
Matrices and Arrays
Creating Arrays and Matrices
Rows, Columns, and Dimensions
Row, Column, and Dimension Names
Indexing Arrays
Combining Matrices
Array Arithmetic
5. Lists and Data Frames
Lists
Creating Lists
Atomic and Recursive Variables
List Dimensions and Arithmetic
Indexing Lists
Converting Between Vectors and Lists
Combining Lists
NULL
Pairlists
Data Frames
Creating Data Frames
Indexing Data Frames
Basic Data Frame Manipulation
6. Environments and Functions
Environments
Functions
Creating and Calling Functions
Passing Functions to and from Other Functions
Variable Scope
7. Strings and Factors
Strings
Constructing and Printing Strings
Formatting Numbers
Special Characters
Changing Case
Extracting Substrings
Splitting Strings
File Paths
Factors
Creating Factors
Changing Factor Levels
Dropping Factor Levels
Ordered Factors
Converting Continuous Variables to Categorical
Converting Categorical Variables to Continuous
Generating Factor Levels
Combining Factors
8. Flow Control and Loops
Flow Control
if and else
Vectorized if
Multiple Selection
Loops
repeat Loops
while Loops
for Loops
9. Advanced Looping
Replication
Looping Over Lists
Looping Over Arrays
Multiple-Input Apply
Instant Vectorization
Split-Apply-Combine
The plyr Package
10. Packages
Loading Packages
The Search Path
Libraries and Installed Packages
Installing Packages
Maintaining Packages
11. Dates and Times
Date and Time Classes
POSIX Dates and Times
The Date Class
Other Date Classes
Conversion to and from Strings
Parsing Dates
Formatting Dates
Time Zones
Arithmetic with Dates and Times
Lubridate
View outline in Word
XRPINP