R Programming from the Ground Up Training

Course duration

Course Benefits

  • Gain an introduction to R programming.
  • Learn R data structures.
  • Learn to work with R functions.
  • Learn statistical data analysis with R.

Course Outline

  1. What is R
    1. What is R?
    2. Positioning of R in the Data Science Space
    3. The Legal Aspects
    4. Microsoft R Open
    5. R Integrated Development Environments
    6. Running R
    7. Running RStudio
    8. Getting Help
    9. General Notes on R Commands and Statements
    10. Assignment Operators
    11. R Core Data Structures
    12. Assignment Example
    13. R Objects and Workspace
    14. Printing Objects
    15. Arithmetic Operators
    16. Logical Operators
    17. System Date and Time
    18. Operations
    19. User-defined Functions
    20. Control Statements
    21. Conditional Execution
    22. Repetitive Execution
    23. Repetitive execution
    24. Built-in Functions
    25. Summary
  2. Introduction to Functional Programming with R
    1. What is Functional Programming (FP)?
    2. Terminology: Higher-Order Functions
    3. A Short List of Languages that Support FP
    4. Functional Programming in R
    5. Vector and Matrix Arithmetic
    6. Vector Arithmetic Example
    7. More Examples of FP in R
    8. Summary
  3. Managing Your Environment
    1. Getting and Setting the Working Directory
    2. Getting the List of Files in a Directory
    3. The R Home Directory
    4. Executing External R commands
    5. Loading External Scripts in RStudio
    6. Listing Objects in Workspace
    7. Removing Objects in Workspace
    8. Saving Your Workspace in R
    9. Saving Your Workspace in RStudio
    10. Saving Your Workspace in R GUI
    11. Loading Your Workspace
    12. Diverting Output to a File
    13. Batch (Unattended) Processing
    14. Controlling Global Options
    15. Summary
  4. R Type System and Structures
    1. The R Data Types
    2. System Date and Time
    3. Formatting Date and Time
    4. Using the mode() Function
    5. R Data Structures
    6. What is the Type of My Data Structure?
    7. Creating Vectors
    8. Logical Vectors
    9. Character Vectors
    10. Factorization
    11. Multi-Mode Vectors
    12. The Length of the Vector
    13. Getting Vector Elements
    14. Lists
    15. A List with Element Names
    16. Extracting List Elements
    17. Adding to a List
    18. Matrix Data Structure
    19. Creating Matrices
    20. Creating Matrices with cbind() and rbind()
    21. Working with Data Frames
    22. Matrices vs Data Frames
    23. A Data Frame Sample
    24. Creating a Data Frame
    25. Accessing Data Cells
    26. Getting Info About a Data Frame
    27. Selecting Columns in Data Frames
    28. Selecting Rows in Data Frames
    29. Getting a Subset of a Data Frame
    30. Sorting (ordering) Data in Data Frames by Attribute(s)
    31. Editing Data Frames
    32. The str() Function
    33. Type Conversion (Coercion)
    34. The summary() Function
    35. Checking an Object's Type
    36. Summary
  5. Extending R
    1. The Base R Packages
    2. Loading Packages
    3. What is the Difference between Package and Library?
    4. Extending R
    5. The CRAN Web Site
    6. Extending R in R GUI
    7. Extending R in RStudio
    8. Installing and Removing Packages from Command-Line
    9. Summary
  6. Read-Write and Import-Export Operations in R
    1. Reading Data from a File into a Vector
    2. Example of Reading Data from a File into A Vector
    3. Writing Data to a File
    4. Example of Writing Data to a File
    5. Reading Data into A Data Frame
    6. Writing CSV Files
    7. Importing Data into R
    8. Exporting Data from R
    9. Summary
  7. Statistical Computing Features in R
    1. Statistical Computing Features
    2. Descriptive Statistics
    3. Basic Statistical Functions
    4. Examples of Using Basic Statistical Functions
    5. Non-uniformity of a Probability Distribution
    6. Writing Your Own skew and kurtosis Functions
    7. Generating Normally Distributed Random Numbers
    8. Generating Uniformly Distributed Random Numbers
    9. Using the summary() Function
    10. Math Functions Used in Data Analysis
    11. Examples of Using Math Functions
    12. Correlations
    13. Correlation Example
    14. Testing Correlation Coefficient for Significance
    15. The cor.test() Function
    16. The cor.test() Example
    17. Regression Analysis
    18. Types of Regression
    19. Simple Linear Regression Model
    20. Least-Squares Method (LSM)
    21. LSM Assumptions
    22. Fitting Linear Regression Models in R
    23. Example of Using lm()
    24. Confidence Intervals for Model Parameters
    25. Example of Using lm() with a Data Frame
    26. Regression Models in Excel
    27. Multiple Regression Analysis
    28. Summary
  8. Data Manipulation and Transformation in R
    1. Applying Functions to Matrices and Data Frames
    2. The apply() Function
    3. Using apply()
    4. Using apply() with a User-Defined Function
    5. apply() Variants
    6. Using tapply()
    7. Adding a Column to a Data Frame
    8. Dropping A Column in a Data Frame
    9. The attach() and detach() Functions
    10. Sampling
    11. Using sample() for Generating Labels
    12. Set Operations
    13. Example of Using Set Operations
    14. The dplyr Package
    15. Object Masking (Shadowing) Considerations
    16. Getting More Information on dplyr in RStudio
    17. The search() or searchpaths() Functions
    18. Handling Large Data Sets in R with the data.table Package
    19. The fread() and fwrite() functions from the data.table Package
    20. Using the Data Table Structure
    21. Summary
  9. Data Visualization in R
    1. Data Visualization
    2. Data Visualization in R
    3. The ggplot2 Data Visualization Package
    4. Creating Bar Plots in R
    5. Creating Horizontal Bar Plots
    6. Using barplot() with Matrices
    7. Using barplot() with Matrices Example
    8. Customizing Plots
    9. Histograms in R
    10. Building Histograms with hist()
    11. Example of using hist()
    12. Pie Charts in R
    13. Examples of using pie()
    14. Generic X-Y Plotting
    15. Examples of the plot() function
    16. Dot Plots in R
    17. Saving Your Work
    18. Supported Export Options
    19. Plots in RStudio
    20. Saving a Plot as an Image
    21. Summary
  10. Using R Efficiently
    1. Object Memory Allocation Considerations
    2. Garbage Collection
    3. Finding Out About Loaded Packages
    4. Using the conflicts() Function
    5. Getting Information About the Object Source Package with the pryr Package
    6. Using the where() Function from the pryr Package
    7. Timing Your Code
    8. Timing Your Code with system.time()
    9. Timing Your Code with System.time()
    10. Sleeping a Program
    11. Handling Large Data Sets in R with the data.table Package
    12. Passing System-Level Parameters to R
    13. Summary

Class Materials

Each student will receive a comprehensive set of materials, including course notes and all the class examples.

Class Prerequisites

Experience in the following is required for this R Programming class:

  • General knowledge of statistics and programming.
Since its founding in 1995, InterSource has been providing high quality and highly customized training solutions to clients worldwide. With over 500 course titles constantly updated and numerous course customization and creation possibilities, we have the capability to meet your I.T. training needs.
Instructor-led courses are offered via a live Web connection, at client sites throughout Europe, and at our Geneva Training Center.