R Programming Language



R is a popular programing language for statistics.

Windows

R Tutorial - Learn R programming from basics including R Installation, R Scripts, Datatypes, Variables, Operators, Decision Making: if; if-else; else-if; switch, Loops: repeat, while, for, break. This blog on R Programming introduces you to R and helps you understand the various fundamental concepts of R programming in detail with examples.

R Programming Language

To install and run R in a Jupyter Notebook:

Language
  1. Start Navigator.

  2. To install the R language and r-essentials packages,select Environments to create an new environment. Click Create.

    Name the environment “r-tutorial”. Next to Packages, selectPython 3.7 and R. Select r from the dropdown menu. Click Create.

  3. Open the environment with the R packageusing the Open with Jupyter Notebook option.

  4. To create a new notebook for the R language, in the Jupyter Notebookmenu, select New, then select R.

  5. We will use dplyr to read and manipulate Fisher’s Iris multivariate data set in this tutorial. Copy and paste the following code into the first cell:

  6. To run the code, in the menu bar, click Cell then select Run Cells,or use the keyboard shortcut Ctrl-Enter.

  7. The iris data table is displayed.

  8. Using ggplot, we can create a scatter plot comparing sepal length and width of three iris species. Click + to open a second cell, then copy and pastethe following code into the second cell:

  9. To run the code, in the menu bar, click Cell then select Run Cells,or use the keyboard shortcut Ctrl-Enter.

R Programming Language Books

R Programming LanguageR programming language example

Top 20 Computer Programming Languages

For more resources on using R with Anaconda, seeUsing R language with Anaconda.