Tutorials 参考 练习 Menu
Paid Courses

R Tutorial

R is a programming language.

R is often used for statistical computing and graphical presentation to analyze and visualize data.

Start learning R now »

示例 in Each Chapter

With our "来试试吧" editor, you can edit R code and view the result.


How to output some text, and how to do a simple calculation in R:

"Hello World!"
5 + 5


[1] "Hello World!"
[1] 10
来试试吧 »


How you can use R to easily create a graph with numbers from 1 to 10 on both the x and y axis:



来试试吧 »

We recommend reading this tutorial, in the sequence listed in the left menu.

R 练习

Test Yourself With 练习


Insert the missing part of the code below to output "Hello World".

Hello World

Start the Exercise

R 示例

Learn by examples! This tutorial supplements all explanations with clarifying examples.

See All R 示例

R 测试

Learn by taking a quiz! This quiz will give you a signal of how much you know about R.

Take the R 测试

W3Schools is optimized for learning and training. 示例 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, cookie and privacy policy.

Copyright 1999-2021 by Refsnes Data. All Rights Reserved.
W3Schools is Powered by W3.CSS.