May 12, 2021 R language tutorial
Try an online environment
You really don't need to set up your own environment to start learning the R programming language. T he reason is simple: we've set up an R programming environment online so that you can compile and execute all available examples online while you're doing theoretical work. T his gives you confidence that you are reading and checks the results with different options. Feel free to modify any examples and execute them online.
Instance:
# Print Hello World. print("Hello World") # Add two numbers. print(23.9 + 11.6)
If you're still willing to set up your environment for the R language, you can follow these steps.
Go to the R language to download the list of mirror sites to download
Select the version to download
Click to run
Go to the installation interface
All the way by default, installed!
The R language is suitable for multi-version Linux systems.
Versions
of Linux vary.
/b12>Specific installation steps have tutorials in the resources above.
However, if you are in a hurry, then you
can use the yum
command, as shown below,
for installation instructions
Install R
$ yum install R
The above commands will install the core functionality of R programming with the standard package, the additional package needs to be installed separately, and then you can follow the prompts
below to start R.
$ R R version 3.2.0 (2015-04-16) -- "Full of Ingredients" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. >
You can now install the required packages using the install command at the R-language prompt. For example, the following command installs the plotrix package required for 3D charts.
> install.packages("plotrix")