A step-by-step guide to installing R and RStudio on Windows, macOS, and Linux, with instructions for verifying your installation and writing your first R code.
Tutorial series
R Fundamentals
8 tutorials — follow in order for the best learning path.
- Installing R and RStudio
- R Basics: Vectors and Types
Learn about R's fundamental data structure—vectors—and understand the different atomic types in R: numeric, integer, character, and logical.
- Data Frames and Tibbles
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
Learn how to write custom functions, control program flow with if-else statements, and use loops for repetitive tasks in R.
- 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.
- Lists and Environments in R
Learn how to create and manipulate lists, understand R environments, and master the scoping rules that power your R programs.
- Working with strings and factors in R: a tutorial
Work with character strings and categorical factors in R. Covers string manipulation, regex, converting to factors, levels, and ordered factors.
- Error Handling in R
Learn how to handle errors and exceptions in R using tryCatch, base R warning functions, and the purrr safely family for functional programming.