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

R Environment Installation

The development environment of the R language itself is equipped with a graphical development environment, which is different from many other engineering languages. Therefore, it is best to install the development environment on an operating system designed for desktop personal computers (such as Windows, macOS, or Ubuntu Desktop, etc.).

Firstly, we need to download the installation package for the R language environment:

Windows

Linux

macOS

The above versions may be outdated. If you need the latest version, you can visit:

Windows Operating System

The installation of Windows is very simple, download the installation package, double-click the downloaded installation package, and start the installation wizard:

Note:The operating system used here is 64 bit, but there are still a few computers using 32 bit operating system, if your operating system is 32 bit, please select "32-bit user installation option.

When we enter the following code in the interactive command window:

print("Hello, world")

The output result is:

"Hello, world"

Linux

Ubuntu Installation

Execute the following command to install the R language execution environment:

# sudo apt update
# sudo apt -y upgrade
# sudo apt -y install r-base

After the installation is successful, you can enter the interactive programming window by executing R commands:

CentOS Installation

# sudo yum install R

Enter the following command to view the installed version:

# R --version

Interactive commands can be exited by entering q():

> q()
Save workspace image? [y/n/c]: y

macOS Installation

The installation of the R language environment on macOS is similar to Windows, download the pkg installation package, double-click the installation package to open, and then follow the installation wizard to install:

After the installation is successful, you can enter the interactive programming window by executing R commands:

Interactive commands can be exited by entering q():

> q()
Save workspace image? [y/n/c]: y