English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

R Language Tutorial

R is a programming language and software environment for statistical analysis, graphical representation, and reporting. R was created by Ross Ihaka and Robert Gentleman of the University of Auckland, New Zealand, and is currently developed by the R core team. R is provided for free under the GNU General Public License and offers pre-compiled binary versions for various operating systems (such as Linux, Windows, and Mac). This programming language is named R, based on the first letters of the names of the two R authors (robertgentlest and rossihaka), and partly named after the S language of Bell Labs.

  

R language is a mathematical programming language designed for mathematical researchers, mainly used for statistical analysis, data visualization, and data mining.

If you are a beginner in computer programming and eager to learn general programming of computers, R language is not a very ideal choice, you can choose Python,C or Java.

R Language and C Language are both research results of Bell Labs, but they have different focus areas. R Language is an interpreted language for mathematical theory researchers, while C Language is designed for computer software engineers.

R Language is an interpreted language (different from the compiled and executed C language), its execution speed is much slower than C language, which is not conducive to optimization. But it provides more abundant data structure operations at the syntax level and can output text and graphic information very conveniently, so it is widely used in mathematics, especially in statistics.

R Language Official Website:https://cran.r-project.org/

Official Mirror List:https://cran.r-project.org/mirrors.html

Who is suitable for reading this tutorial?

This tutorial is specially designed for software programmers who need to learn R Language from scratch.

If you are an experienced R Language user, you can still get grammar references from this tutorial, but the tutorial itself may not contain content that can solve your deep problems.

Features of R Language

  • The R Language environment software belongs to GNU open-source software, with good compatibility and free to use

  • Syntax is very conducive to complex mathematical operations

  • Rich data types, including vectors, matrices, factors, datasets, and other common data structures

  • Good code style, strong readability

Although R is mainly used for statistical analysis or the development of statistical software, some people also use it for matrix calculations. Its analysis speed is comparable to that of free software GNU Octave and commercial software MATLAB.

Compile/Execute R Program

Example (helloworld.R)         

myString <- "Hello, World!"
print ( myString )
Test and See ‹/›

R Language files have the suffix .R.

References