Basics of R
Master the fundamentals of R programming — from variables and data types to functions, data structures, file I/O, and professional best practices for statistical computing.
Your Learning Path
Follow these lessons in order, or jump to any topic that interests you.
1. Introduction
What is R? Its history, why it matters for statistics and data science, and where R is used today.
2. Installation & Setup
Install R and RStudio, explore the IDE, install packages from CRAN, and run your first script.
3. Variables & Data Types
Assignment operators, numeric, integer, character, logical types, vectors, and string operations.
4. Control Flow
if/else, for/while loops, repeat/break, the apply family, and vectorized operations.
5. Functions
Define functions, parameters, defaults, the pipe operator, scope, and error handling with tryCatch.
6. Data Structures
Vectors, matrices, arrays, lists, data frames, and factors — when and how to use each.
7. File I/O
Read and write CSV, Excel, JSON, and RDS files. Connect to databases with DBI.
8. Best Practices
Tidyverse style guide, project organization, debugging, testing, and common R vs Python differences.
What You'll Learn
By the end of this course, you'll be able to:
Write R Programs
Create scripts using variables, control flow, functions, and data structures confidently.
Work with Data
Read, write, and manipulate data in CSV, Excel, JSON, and RDS formats.
Use R Data Structures
Leverage vectors, matrices, data frames, lists, and factors for statistical computing.
Follow Best Practices
Write clean, well-organized R code with proper project structure and package management.
Lilly Tech Systems