2  Pre-project Exercise

If you have completed the Setup, you are ready to start the Pre-project Exercise. If you haven’t, you’re not. Go back and complete it before you proceed.

The Pre-project Exercise has one real purpose and that is to get you and your computer ready for the Main Project. Successful completion entails:

Do not treat this exercise as a mere nuisance. It counts for 5% of your Project score.

Scoring the exercise

The Pre-project Exercise is scored all-or-nothing; there is no partial credit. You will receive full credit if and only if your content is correct and the slide deck is 100% format compliant as shown in pre_project_knitted_template.html. Take the formatting condition seriously – any deviation will result in no credit.

2.1 The exercise deliverable

The Pre-project Exercise deliverable is a 3-slide deck, submitted as a PDF, that reads the March 2024 CPS and replicates the labor force participation rate (LFPR) and its components for that month. The deck includes:

  1. A title slide
  2. A slide that reads a CSV file and prints its contents
  3. A slide that describes the contents of the CSV file in a paragraph using the correct values from the CSV.

That’s it. Three slides.

2.2 The workflow that produces the deliverable

Follow these steps in order to produce the slide deck:

  • Step 1: Open the Project in RStudio

    Double-click Project.Rproj in your BUSN 5000/Project/ folder. RStudio opens with the project loaded. You should see “Project” in the top-right corner of the RStudio window.

  • Step 2: Open and run the Pre-project script LF.R

    LF.R reads the raw CPS data file (pppub24.csv), computes the LFPR for March 2024 and its components, and writes the results to out/LF.csv. The script is complete; do not make any edits. To run the script:

    1. Go to the Files tab in the bottom-right pane of RStudio.
    2. Click the r/ folder.
    3. Click LF.R to open it in the editor.
    4. In the editor, select all lines using Ctrl+A on Windows or Cmd+A on a Mac.
    5. Click the Run button in the top-right of the editor pane.

    If the script successfully runs, you should see the message March 2024 LFPR = 62.7... and the file LF.csv should appear in the out/ subfolder.

  • Step 3: Open and edit the Pre-project R Markdown template

    Go to the Files tab in the bottom-right pane of RStudio, move up to the main Project/ folder and click pre_project.Rmd to open it in the editor.

    The first (title) slide is generated by the YAML (which stands for YAML Ain’t a Markup Language) block, set off by the --- markers. Slides two and three are delineated by the ## headers, the second slide starting with “Read LF.csv and print its contents” and the third with “Document the contents of LF.csv.”

    The only edit to make in the YAML block is to the author line. Replace firstname lastname with your first and last name like this:

    author: "Jane Doe"

    Do not change anything else in the YAML. If your YAML becomes corrupted, here is the definitive code block to replace your corrupted version.

    ---
    title: "BUSN 5000 :: Pre-Project Exercise"
    subtitle: Measuring Labor Force Participation
    author: "First Name Last Name"
    date: |
        | Summer 2026
        | (updated `r format(Sys.time(), '%d %b %y')`)
    output:
      ioslides_presentation:
        css: css/project_slidedeck.css
        widescreen: false
    urlcolor: "#004E60"  # Use hex code for Olympic blue from visual UGA guide
    ---

    Just below the YAML is the setup chunk, which is complete and requires no edits. It loads the required R packages and sets global options for the rest of the document. Do not touch this.

    The second slide of the template contains a small R code chunk marked by three backticks on the first and last lines:

    lf <- read_csv(here("out", "LF.csv"))
    print(__)

    The first line reads the file LF.csv (generated by LF.R) and stores it in a data frame called lf. The second line contains a print command that you must complete by replacing the blank __ with the name of the object you want to print, like this:

    lf <- read_csv(here("out", "LF.csv"))
    print(lf)

    Run the chunk by clicking the small green play button at the top-right of the chunk. If there are no errors, the lf data frame contents will be printed in the console — six columns named E, U, LF, NILF, Pop, and LFPR, with one row of numbers.

    When the chunk runs successfully, change the chunk option eval = FALSE to eval = TRUE at the top of the chunk. This tells R Markdown to run the chunk when you knit. We set it to FALSE by default so the template knits before you complete it.

    The third slide is a descriptive paragraph with six blanks serving as placeholders for the LFPR and its components as defined in LF.R. Replace each blank with the appropriate value from the second slide’s output.

  • Step 4: Knit pre_project.Rmd to an HTML slide deck and save it as a PDF

    Click the Knit button at the top of the editor pane. If there are no errors, pre_project.html will appear in your Project/ folder and RStudio will open it automatically in its viewer or your browser. The Submission chapter shows exactly what pre-project slide deck should look like when rendered correctly. Compare yours with the benchmark before saving and submitting.

    Unfortunately, Gradescope does not accept HTML files, so you must save the HTML as a PDF. Do not knit directly to PDF; that will not produce the correct format. Instead, use your browser’s Save As / Print to PDF function to save the HTML output as a PDF. See the Submission chapter for the exact procedure and browser-specific tips.

2.3 Avoid these mistakes

The most common errors we see in attempts of the Pre-project Exercise are:

  1. Leaving eval = FALSE after completing the code chunk. If eval = FALSE, the chunk doesn’t run when you knit, so the output doesn’t appear on the slide. Set it to TRUE once your code is correct.

  2. Values in the third slide paragraph don’t match those in LF.csv. This usually means a student made a transcription error or used a source different from the output of LF.R.

  3. YAML edits beyond the author line. Changing anything in the YAML besides the author name will break the knit format. Don’t touch the title, subtitle, date, output, css, or any other field.

  4. CSS file not correctly placed. If project_slidedeck.css is anywhere other than Project/css/, the knit produces an unstyled output that won’t match the template.

When in doubt, see Common Errors, which provides a comprehensive listing of errors we’ve seen students make.

2.4 What happens next

After successfully completing the Pre-project Exercise, you are ready to begin work on the Main Project. The Main Project template will be downloaded to Project/ folder and you will follow the same workflow outlined here.