Start here to learn R!

start here to learn RReady, set, go!

On R-exercises, you will find more than 1,000 R exercises. We’ve bundled them into exercise sets, where each set covers a specific concept or function. An exercise set typically contains about 10 exercises, progressing from easy to somewhat more difficult. In order to give you a full picture of all the amazing content on this website, we’ve categorized all sets into broader topics below.

Start at the beginning, or anywhere you want

If you’re completely new to R, we suggest you simply start with the first topic, “Vectors”. Once you’ve managed to work through all exercise sets, from top to bottom, you should have a fair amount of knowledge of, and practical experience with, using R. Of course, those of you who are familiar with R already, can jump straight to any of the topics below.

Enroll in an online R course

Also, consider enrolling in an online R course to speed up learning, for example R Programming A-Z™: R For Data Science With Real Exercises! if you’re a beginner, or R Programming: Advanced Analytics In R For Data Science if you’re already at an intermediate level. Or even better, check out our R Course Finder directory, which includes more than 140 R courses, and use its filters and search to quickly find the perfect R course that matches your level and interests!

Subscribe and share

New exercise sets are added on a daily basis. Subscribe to R-exercises to receive weekly updates and bonus sets by email. For Free! Read Why exercise and Celebrating our 100th Exercise Set to better understand our philosophy. If you enjoy our exercises, please share this page with your friends.

Have fun!

Exercise sets by Topic

Vectors and sequences

  1. Vectors [vol. 1] [vol. 2]
  2. Regular sequences [vol. 1] [vol. 2]
  3. Logical vectors and operators
  4. Missing Values
  5. Character vector exercises
  6. Index vectors

Object modes and attributes

  1. Mode exercises
  2. Practical used of R objects: Some examples


  1. Factor Exercises

Arrays and Matrices

  1. Matrix exercises [vol. 1] [vol. 2]
  2. Array exercises
  3. Bind exercises
  4. Matrix operations

Lists and dataframes

  1. List exercises [vol. 1] [vol. 2]
  2. Data frame exercises [vol. 1] [vol. 2]
  3. Merging Dataframes Exercises
  4. Accessing Dataframe Objects Exercises
  5. Apply functions to lists

Importing data

  1. Reading delimited data
  2. Scan exercises
  3. R-SQL
  4. Web scraping

Character strings

  1. Regular expressions part 1
  2. String manipulation
  3. [BONUS] Working with tm package and wordclouds *
  4. [BONUS] Character functions *

* Subscribe for free to access BONUS exercises and receive our weekly newsletter.


  1. data exploration with table
  2. Complex tables
  3. Cross Tabulation with Xtabs

Data manipulation

  1. Get-your-stuff-in-order-exercises
  2. Basic operations
  3. Summary statistics with aggregate()
  4. Data Shape Transformation With Reshape()
  5. Interactive Subsetting exercises
  6. Reshape 2 exercises
  7. Efficient data processing with apply
  8. Optimize data processing with sapply
  9. Sampling exercise [part 1]
  10. Select and query
  11. Let’s get started with dplyr
  12. Multivariate apply
  13. Data table exercises: keys and subsetting
  14. [BONUS] Tidy the data up! *

* Subscribe for free to access BONUS exercises and receive our weekly newsletter.


  1. As.Date()
  2. Lubridate [part 1] [part 2] [part 3]
  3. zoo time series exercises

Probability distributions

  1. Combinations exercises
  2. Lets Begin with something sample
  3. Generating data

Loops and conditional execution

  1. Conditional execution exercises [vol. 1] [vol. 2]
  2. Scripting Loops in R [vol. 1] [vol. 2]
  3. [BONUS] Simplifying For loops *

* Subscribe for free to access BONUS exercises and receive our weekly newsletter.


  1. Functions exercises [vol. 1] [vol. 2]
  2. Higher order functions

Data visualization

  1. Start plotting data!
  2. Customize a scatterplot exercises
  3. Replicating plots: Boxplot
  4. Advanced base graphics
  5. Graphics parameters exercises
  6. 3D plotting exercises
  7. Igraph Network analysis part 1
  8. Igraph Network analysis part 2
  9. Igraph Network analysis part 3
  10. Shiny Apps [part 1] [part 2] [part 3] [part 4] [part 5]
  11. Shapefiles
  12. Getting started with Plotly: basic plots
  13. Plotly: advanced plots and features
  14. Lattice graphs [part 1] [part 2]
  15. [BONUS] Rebuilding a Figure *

* Subscribe for free to access BONUS exercises and receive our weekly newsletter.


  1. Examining data
  2. Independent t-test
  3. Paired t-test
  4. One way ANOVA in R
  5. Two way ANOVA in R
  6. Nonparametric tests
  7. Repeated measures ANOVA in R
  8. Frequency and chi-square test for independence
  9. [BONUS] Working with and visualizing a confidence interval *
  10. Model evaluation [part 1] [part 2]
  11. Basic tree [part 1] [part 2]
  12. Intermediate tree [part 1] [part 2]
  13. Recursive partitioning and regression trees
  14. [BONUS] Evaluating a linear time series model *
  15. Hierarchical clustering
  16. Multiple regression [part 1] [part 2]
  17. [BONUS] ROC curves *

* Subscribe for free to access BONUS exercises and receive our weekly newsletter.


  1. Analysis of stock prices [part 1] [[part 2] [part 3]
  2. Shares analysis using Quantmod package
  3. using MANOVA to analysis the banking crisis


  1. Best practices while writing R code Exercises
  2. Bioinformatics Tutorial with Exercises in R [part 1]

Stand alone series: Data preparation made simple

  1. Descriptive analytics, Part 0: Data Exploration
  2. Descriptive analytics, Part 1: Data Formatting
  3. Descriptive analytics, Part 2: Data Imputation
  4. Descriptive analytics, Part 3: Outlier Treatment
  5. Descriptive analytics, Part 4: Data Manipulation
  6. Descriptive analytics, Part 5: Data visualisation (continuous variables)
  7. Descriptive analytics, Part 5: Data visualisation (categorical variables)
  8. Descriptive analytics, Part 5: Data visualisation (spatial data)
  9. Descriptive analytics, Part 6: Interactive dashboard [part 1] [part 2]