Analyzing data with the R programming language in the Jupyter Notebook
R (http://www.r-project.org) is an open-source domain-specific programming language for statistics. Its syntax is well-adapted to statistical modeling and data analysis. By contrast, Python's syntax is typically more convenient for general-purpose programming. Luckily, Jupyter allows us to have the best of both worlds. For example, we can insert R code snippets anywhere in a normal Jupyter notebook. We can continue using Python and pandas for data loading and wrangling, and switch to R to design and fit statistical models. Using R instead of Python for these tasks is more than a matter of programming syntax; R comes with an impressive statistical toolbox.
In this recipe, we will show how to interface R with Python in the Jupyter Notebook, and we will illustrate the most basic capabilities of R with a simple data analysis example.
Note
There is another way of using R in the Jupyter Notebook, which is to install IRkernel...