Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL SQLITE MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST DART PLAYWRIGHT TOOLS MATH SHEETS POWER BI

R Exercises


Test your R skills with exercises from all categories:

Exercises

Tip: Sign in to track your progress.

0/69 done

Syntax4 exercises

Done

Print4 exercises

Done

Comments4 exercises

Done

Variables6 exercises

Done

Concatenate Elements6 exercises

Done

Multiple Variables4 exercises

Done

Variable Names5 exercises

Done

Data Types6 exercises

Done

Numbers3 exercises

Done

Math7 exercises

Done

Type Conversion5 exercises

Done

Strings7 exercises

Done

Escape Characters4 exercises

Done

String Functions5 exercises

Done

Booleans7 exercises

Done

Operators3 exercises

Done

Arithmetic Operators6 exercises

Done

Assignment Operators4 exercises

Done

Comparison Operators4 exercises

Done

Logical Operators4 exercises

Done

Miscellaneous Operators3 exercises

Done

Operator Precedence4 exercises

Done

If...Else7 exercises

Done

Nested If3 exercises

Done

And Or3 exercises

Done

Switch5 exercises

Done

While Loop6 exercises

Done

For Loop5 exercises

Done

Nested Loop3 exercises

Done

Functions7 exercises

Done

Nested Functions3 exercises

Done

Recursion4 exercises

Done

Global Variables3 exercises

Done

Errors5 exercises

Done

Error Handling4 exercises

Done

Dates5 exercises

Done

Packages4 exercises

Done

Vectors7 exercises

Done

Vector Operations5 exercises

Done

Lists5 exercises

Done

Named Lists4 exercises

Done

Matrices5 exercises

Done

Arrays5 exercises

Done

Data Frames5 exercises

Done

Filter and Sort5 exercises

Done

Read and Write CSV4 exercises

Done

Factors5 exercises

Done

Missing Values5 exercises

Done

Apply Functions4 exercises

Done

Plot5 exercises

Done

Line3 exercises

Done

Scatter Plot3 exercises

Done

Pie Charts4 exercises

Done

Bar Charts3 exercises

Done

Histogram4 exercises

Done

Box Plot4 exercises

Done

Strip Chart4 exercises

Done

ggplot24 exercises

Done

Max and Min3 exercises

Done

Mean2 exercises

Done

Median3 exercises

Done

Mode3 exercises

Done

Percentiles3 exercises

Done

Standard Deviation3 exercises

Done

Variance3 exercises

Done

Correlation3 exercises

Done

Classes and Objects4 exercises

Done

S3 Classes4 exercises

Done

S4 Classes4 exercises

Done

Log in to track your progress

If you haven't already, sign up to become a W3Schooler, and get points for every exercise you complete.

As a logged-in W3Schools user you will have access to many features like having your own web page, track your learning progress, receive personal guided paths, and more.


The Exercise

The exercises are a mix of "multiple choice" and "fill in the blanks" questions.

There are between 3 and 9 questions in each category.

The answer can be found in the corresponding tutorial chapter.

If you're stuck, or answer wrong, you can try again or hit the "Show Answer" button to see the correct answer.



Free account

Track your progress

XP earned 0 Day streak 0 Spaces 0 League —

New

Learn in Adventure Mode W3Schools Adventure App

Coding fundamentals as bite-sized lessons and challenges.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by W3Schools. All Rights Reserved. W3Schools is Powered by W3.CSS.