THE WORLD'S LARGEST WEB DEVELOPER SITE

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.

Example

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

"Hello World!"
5 + 5

Result:

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

Example

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

plot(1:10)

Result:

来试试吧 »

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


R 练习

Test Yourself With 练习

Exercise:

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 示例





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.

W3Schools.com