Prework

๐Ÿ–ฅ๏ธ 1. Download and Install the Software

Before the workshop, make sure you can open R and RStudio on your computer.

  • From FWS Apps-To-Go, install:
    • R 4.4.2 or newer
    • RStudio 2024.09.1 or newer
NoteCheck Your Versions
  • In RStudio, go to Help โ†’ About RStudio to confirm your version.

  • In the R console, type:

    R.version.string

    If your versions are older, please update them.

Once installed, open RStudio to make sure it launches without errors.


๐Ÿ“‚ 2. Understanding RStudio Projects (for newer R users)

We will work inside an RStudio Project, which is like a self-contained folder that keeps all your files and code organized.

  • An R Project keeps track of your working directory.
  • All the files for this workshop will live inside one project folder.
  • When you open the project, RStudio automatically sets that folder as your โ€œhome base.โ€
TipWhy Projects Matter

Think of an R Project as a container for your work. Instead of scattering files across your computer, everything you need is in one place.


๐Ÿ“ฆ 3. Download the Exercise Materials

Open RStudio and run this in the Console:

if (!require("usethis")) install.packages("usethis")
usethis::use_course("https://github.com/USFWS/intro-to-quarto-exercises/archive/refs/heads/main.zip")
NoteWhat Happens Next
  • RStudio may prompt you to open the new project folder โ€” click Yes.
  • You should now see the RStudio title bar say: intro-to-quarto-exercises-main.
  • If not, find the intro-to-quarto-exercises-main folder and double-click the .Rproj file.

๐Ÿ“š 4. Install R Package Dependencies

With the project open, run:

source("install_packages.R")
WarningThis May Take Time

The first time you install packages, it may take several minutes. Make sure youโ€™re connected to the internet.


๐Ÿ“ 5. Install TinyTeX (for PDFs)

To render Quarto documents as a PDF, youโ€™ll need LaTeX.

Run:

tinytex::install_tinytex()
TipGood to Know

You only need to install TinyTeX once. If you already have LaTeX, you can skip this step.


โœ… 6. Check Your Setup

Before the workshop, confirm:

quarto::quarto_check()

๐Ÿง‘โ€๐Ÿ’ป 7. Prework Assignment (Submit Before the Workshop)

Goal: Confirm your setup works end-to-end by rendering a Quarto document.

  1. In RStudio (with the intro-to-quarto-exercises-main project open):
    • Go to File โ†’ New File โ†’ Quarto Documentโ€ฆ
    • Choose HTML format and title it โ€œPrework Checkโ€.
  2. Replace the starter text with:
# Hello Quarto!

- **Name:** YOUR NAME
- **Fun fact:** FUN FACT ABOUT YOU

```{.r}
#| echo: true
#| message: false
#| warning: false
sessionInfo()
```
  1. Click Render to create the HTML output.
  2. (Optional) Also render to PDF:
    • In the YAML header, add format: pdf.
    • Render again to produce a PDF.
NoteWhat to Submit
  • The rendered HTML file (and PDF if you tried it).
  • A screenshot of RStudio showing:
    • The project name intro-to-quarto-exercises-main in the title bar.
    • The rendered output in the Viewer/Preview pane.
TipPass Criteria
  • HTML renders successfully (no errors).
  • If attempted, PDF renders successfully.
  • Screenshot clearly shows the correct project open.