getwd()Project Setup
This section guides you through setting up your R environment for data documentation and validation. You’ll create a project using Quarto, a tool for creating documents that combine code and text.
You might wonder: “I just want to learn about data dictionaries and validation. Why do I need Quarto?”
Quarto lets you write documents that mix explanatory text with R code, then automatically generate professional HTML/PDF reports. Your data dictionary and validation results will live in one cohesive document that you can share with collaborators.
The payoff: After this one-time setup, you’ll be able to generate beautiful, reproducible data documentation with a single click.
Create Quarto Project
First, we will need to create a new Quarto project.
If you haven’t already, open RStudio – see Note 1 for how to use the terminal instead. Then, click on File > New Project… to open the New Project Wizard.

Here, select New Directory

And choose the project type Quarto Project.

Finally, enter the name of the directory where our report will be created in, for example data-documentation-validation-exercise.
You can leave Create a git repository and Use renv with this project unchecked to keep things simple for this tutorial.
If you are already familiar with Markdown and Quarto, you can also uncheck the box Use visual markdown editor.

Click on Create Project. Your RStudio window should now look similar to this:
If, like in the image, a Quarto file with some demo content was opened automatically, you can close and delete it, for example, using RStudio’s file manager.
Throughout this tutorial, you’ll run R code interactively. For now, you can type commands directly into the Console tab. On the next page, you’ll create an R script file to keep your code organized.
Without RStudio, you can create a Quarto project by typing the following into a terminal:
Terminal
quarto create project default data-documentation-validation-exercise
cd data-documentation-validation-exercise/
rm data-documentation-validation-exercise.qmdThen, open an R session by typing R into the terminal. Make sure that getwd() shows your working directory is data-documentation-validation-exercise.
Next Steps
Your project is now set up with Quarto! In the next section, you’ll install the R packages needed for data documentation and get familiar with the Palmer Penguins dataset.
