L2: Introduction to R, Quarto, and R evironments

Bogdan G. Popescu

John Cabot University

Installing R and R Studio

We will install two programs

  • R
  • R Studio

Installing R and R Studio

We can do that by going to: https://posit.co/download/rstudio-desktop/

Installing R Studio

We can do that by going to: https://posit.co/download/rstudio-desktop/

Install the version of RStudio relevant for your OS.

Note that there are different files for Apple silicon (M1/M2) Macs and for Intel Macs

Installing R Studio

We can do that by going to: https://posit.co/download/rstudio-desktop/

Install the version of RStudio relevant for your OS.

Note that there are different files for Apple silicon (M1/M2) Macs and for Intel Macs.

R panels

The platform interface for R studio looks like below:

R panels

The platform interface for R studio looks like below:

R panels

The platform interface for R studio looks like below:

R panels

The platform interface for R studio looks like below:

Quarto Files

Quarto is a version of R Markdown from RStudio that allows us to run code and write text.

Quarto files have the *.qmd extension

Quarto Files

You can produce a wide variety of output types:

  • executable code blocks
  • plots
  • tabular output from data frames
  • plain text output

Installation

You can now start typing.

To use Quarto with R, you should install the rmarkdown R package:

install.packages("rmarkdown")

Installation

You can now start typing.

To use Quarto with R, you should install the rmarkdown R package:

Installation

You can now start typing.

To use Quarto with R, you should install the rmarkdown R package:

Installation

You can now start typing.

To use Quarto with R, you should install the rmarkdown R package:

Using R

Let us now use R to understand how it works.

Let’s create a new quarto document and save it in your “week2” folder

Using R

Using R