Chapter 2 Introduction

We are now going to install the tools we need. We will start from R, to then move to RStudio and, finally, the packages we are going to need.

2.1 Installing R

Installing R has never been easier! You can simply follow the instructions you find in the video.

install-R from RStudio, Inc. on Vimeo.

An alternative is Microsoft R Open, which can be downloaded here. It lags behind the current R version, but it comes with better performance tweaks included.

2.2 Installing RStudio

Once you have got R installing, simply follow this other video.

Install RStudio from RStudio, Inc. on Vimeo.

2.3 Installing packages

We now cover the installation of packages. Packages extend the amount of things you can do with R, from plotting to data analysis. We will be using the moxier package through this course, for instance.

To quickly get up to speed as to how install packages, again, simply follow the video. Just, for the time being, skip the tidyverse installation.

install Packages from RStudio, Inc. on Vimeo.

2.4 Installing moxier

We are now ready to install moxier! First, we need to install an auxiliary package, the remotes package. This package allows to install other packages from GitHub. GitHub is a place where many people develop and publish open-source software.

To install remotes, simply type in your console

install.packages("remotes")

Once the installation is complete, you can install moxier

remotes::install_github("mascaretti/moxier")

2.5 Using moxier

We are now interested in using moxier. What is inside it? To find out, we list the tutorials contained in the package.

Name Title
00-introduction-installing-r Installing R and RStudio
01-introduction-programming-r Programming in R
02-data-visualisation-graphics Graphics in Base R
03-data-visualisation-ggplot2 Introduction to ggplot
04-descriptive-statistics-univariate Univariate Descriptive
05-descriptive-statistics-depth-measures Depth Measures
06-descriptive-statistics-multivariate Multivariate Descriptive
07-descriptive-statistics-curse-dimensionality Curse of Dimensionality
08-dimensionality-reduction-pca PCA: Example 1
09-dimensionality-reduction-pca PCA: Example 2
10-dimensionality-reduction-pca PCA: Exercise 1
11-hypotheses-test-anova HT and ANOVA: Exercise 1
12-hypotheses-test-anova HT and ANOVA: Exercise 2
13-linear-regression Regression: Exercise 1
14-linear-regression Regression: Exercise 1
15-classification Classification - Cytokine
16-classification Classification - Human Data
17-clustering Clustering - 00
18-clustering Clustering - Iris
19-clustering Clustering - Earthquakes
20-extra-dplyr-intro dplyr: An Introduction

Now, let us imagine you wish to run the tutorial on how to install R.

Simply run

learnr::run_tutorial(name = "00-introduction-installing-r", package = "moxier")

Quite smooth, right? Of course, put the title you are interested in to run the respective tutorial. To see the full list,

learnr::available_tutorials(package = "moxier")

VoilĂ ! You are ready to start learning!

2.5.1 Closing a notebook

To close a notebook, first of all close the tab on your web browser. Then, go back to RStudio a click on the Stop in the console. The Stop button is the red button in your console!