background picture with networks
Module 2 | Lesson 2

Your first report in 3 min.

Now that we understand what a data analytics report is, let's build one using Quarto!

I'm confident you can do this in less than 3 minutes πŸ”₯

Free
3 minutes read

1️⃣ Open R Studio

R Studio is an IDE (Integrated Development Environment) for R.

You should have it installed already. But just in case, it is available here otherwise.

2️⃣ Install required packages

The rmarkdown library is required to render a quarto file. To install it, simply use install.packages("rmarkdown") in the console.

3️⃣ Create a quarto file

In R Studio, click File β†’ New File β†’ Quarto Document...

rstudio start new quarto doc path


A window opens. Give a random title like Test Doc and click Create. Ignore the rest for now! This title will be written in big at the top of the report.

rstudio modal at quarto doc creation


You just created your first quarto document πŸŽ‰. For now it is just a file with a .qmd extension.

4️⃣ Save the file

Click File β†’ Save (or use the shortcut cmd + s) to save the file.

Call the file test.qmd, and save it wherever you want on your computer. (but remember where πŸ™ƒ!)

That's it, we have our first quarto doc on our machine. Note that this file must have the .qmd extension!

Take a very quick look at the doc. There is a header, some text and some R code. The R code is minimal (1 + 1) for now.


Quarto doc overview

5️⃣ Render the document

Click the Render button and the magick happens. An engine will read your text, execute your R code, and build an HTML document with all of that!

Your browser should open the .html output in a new tab. You are reading your first Quarto output! πŸ‘

Locate your test.qmd file; you'll also find test.html, the rendered output of test.qmd. Avoid editing test.html directlyβ€”always update test.qmd and re-render for changes.


Now read the document carefully and try to understand what each part of the .qmd doc became in the .html.

Homework

It's time to transform our analysis.R file in a Quarto document! πŸ”₯

0
Open R Studio. Create a new Quarto file. Call the document Penguin Analysis. Save the document as analysis.qmd in the R folder of our work project.
1

Replace the current text of the quarto document. Explain briefly what we are doing in our penguin analysis!

2

Replace the current R code (1 + 1) with the code we have in our analysis.R file.

3

Click Render to build the report and get an HTML file. Remove the analysis.R file, we won't need it anymore!

← Previous

What is a notebook?

Next β†’

Format text with Markdown

πŸŽ‰ 100 half-price seats available β€” 3 left! πŸ”₯