R Programming

The R environment

R is an integrated suite of software facilities for data manipulation, calculation, and graphical display. Among other things it has

  • an effective data handling and storage facility,
  • a suite of operators for calculations on arrays, in particular, matrices,
  • a large, coherent, integrated collection of intermediate tools for data analysis,
  • graphical facilities for data analysis and display either directly at the computer or on hardcopy, and
  • a well developed, simple and effective programming language (called ‘S’) which includes conditionals, loops, user defined recursive functions and input and output facilities. (Indeed, most of the system supplied functions are themselves written in the S language.)

The term “environment” is intended to characterize it as a fully planned and coherent system, rather than an incremental accretion of very specific and inflexible tools, as is frequently the case with other data analysis software.

R is very much a vehicle for newly developing methods of interactive data analysis. It has developed rapidly and has been extended by a large collection of packages. However, most programs written in R are essentially ephemeral, written for a single piece of data analysis.

Course Materials

  1. R: The true basics; Basic Data Types
  2. Create and Name Vectors; Vector Arithmetic; Subsetting Vectors
  3. Create and Name Matrices; Subsetting Matrices; Matrix Arithmetic
  4. Factors
  5. Create and Name Lists; Subset and Extend Lists
  6. Explore the Data Frame; Subset - Extend - Sort Data Frames
  7. Basic Graphics; Customizing Plots; Multiple Plots
  8. OnePageR: A Survival Guide to Data Science with R

Data Analysis and Visualization Using R [URL]

This is a course that combines video, HTML, and interactive elements to teach the statistical programming language R.

Links: R Language Tutorial; An Interactive Introduction to R; Programming in R, A Short Introduction; Introduction to R; Introducing R; An Introduction to R; R Bootcamp; R Fundamentals and Programming Techniques; R Data Import/Export; Writing R Extensions; The R Manuals; Introduction to R Studio; An Introduction to R; A slightly different introduction to R (Part I (Slides), Part II, Part III, Part IV, Part V);

List of Textbooks/Resources

  1. An Introduction to R by W. N. Venables, D. M. Smith, and the R Core Team
  2. 60+ R resources to improve your data skills
  3. Introduction to R by Guy Yollin (Computational Finance and Risk Management)