Step-by-step guide for installing R and RStudio on Windows, macOS, and Linux. Verify your installation, write first R code, and set up packages.
Tutorial series
R Fundamentals
8 tutorials — follow in order for the best learning path.
- Installing R and RStudio on Windows, macOS, and Linux
- Working with Vectors and Atomic Types in R
Master working with R vectors and atomic types — numeric, integer, character, logical — plus vectorized operations, type coercion, and subsetting.
- Data Frames and Tibbles in R: A Complete Tutorial
Learn to create, manipulate, and transform data frames and tibbles in R—the essential structures for working with tabular data in R.
- Functions and Control Flow in R
R functions control how code executes: write custom logic, use if-else for decisions, and handle repetition with loops for cleaner data analysis.
- Importing and Exporting Data in R
Learn how to read and write data files in R, from basic CSV handling to Excel files and beyond. Working with data means getting it in and out of R.
- R Lists and Environments: A Complete Tutorial
Master R lists and environments: create nested structures, understand lexical scoping, and use environments for namespaces and mutable state in your R code.
- Working with strings and factors in R: a tutorial
Working with strings and factors in R — manipulate text, use regular expressions, create categorical factors with custom levels, and build ordered factors.
- Error Handling in R, Learn how to handle errors and exceptions
Learn how to handle errors and exceptions in R using tryCatch, base R warning functions, and the purrr safely family for functional programming.