How to use this book

The chapter pattern

Every chapter follows the same structure:

  1. Chapter goals — what you will be able to do by the end.
  2. Expected output callout — the concrete deliverable for the chapter assignment.
  3. Where we are — how this chapter connects to the previous one.
  4. Excel-to-R bridge (from Chapter 4 onward) — every Excel pattern paired with its R equivalent.
  5. Core content — concepts and demonstrations.
  6. Active learning — 5–6 short activities to try immediately.
  7. Group lab activity — a single longer task designed for a lab session, often in groups of 3–4.
  8. Exercises — 6–8 take-home exercises.
  9. Optional, advanced — material for learners who want to go deeper.
  10. Glimpse of the next chapter — a forward-looking preview.
  11. Self-assessment quiz — 20 questions with instant feedback.
  12. AI as a debugging companion — when to use AI, how to prompt it, and when not to.
  13. Reading — references, including a mix of canonical and diverse sources.
  14. Instructor notes (collapsed callout) — pacing, grading rubric, common mistakes.

Materials you will receive per chapter

File Purpose
Chapter HTML (rendered from .qmd) The chapter itself — read, follow examples
Learner workbook (frst232_chNN_learner.qmd) A Quarto document with TODO chunks for the exercises
Solutions (frst232_chNN_solutions.qmd) Completed answers — for instructor use only until released
Standalone quiz (quiz_chNN.html) Self-paced practice quiz
Raw data (where applicable) The forestry dataset for the chapter
Starter zip (Chapters 4 and 5) Pre-built RStudio Project for first-time R users

How to get help

In order of who to ask first:

  1. Re-read the relevant chapter section. The chapter has the answer in 70% of cases.
  2. Search the chapter’s Instructor notes callout for “Common stumbling points”.
  3. Read the error message carefully — R error messages are often more helpful than they look on first read.
  4. Ask a classmate — a peer who solved the same problem 30 minutes ago is often the fastest help.
  5. Office hours, course site discussion forum, or email the TA.
  6. AI assistants — use them as debugging companions, not answer machines. The chapter has guidance on how to prompt effectively (and when NOT to use AI).

How to write a useful AI prompt

When you do reach for an AI assistant, a good prompt gets a useful answer. Use this formula:

Context + dataset + task + what I tried + error/output + what I need help with

Worked example:

“I am using R in FRST 232. I have a tibble called bc from bc_disturbance_reforestation.xlsx. I want to calculate the total reforested area by decade. I tried this code: [paste your code]. I got this error/output: [paste the exact error/output]. Please explain what went wrong and suggest a fix. Do not skip steps, and tell me how to verify the answer.”

Every time you ask AI for help:

  • Paste the exact error message — not a paraphrase.
  • Include the dataset and column names you are working with.
  • Ask the AI to explain the code line by line, not just hand you code.
  • Ask it for verification steps you can run yourself.
  • When you are unsure, compare answers across two AI tools.
  • Check every suggestion against the book, the package documentation, and your actual data.
  • Never submit AI output you do not understand and have not verified.

The goal is not to make AI do the work. The goal is to use AI to help you understand, check, and improve your own work.

A note on the lab sessions

Most chapters have a Practice Demo Lab — a guided practice activity in this book. The official graded lab assignments are posted on Canvas; the book demos help you learn the workflow first. A few weeks have special lab sessions in the current schedule:

  • Week 5 = guided integrated case-study / Excel-to-R transition lab.
  • Week 6 = Excel midterm (covers the Excel chapters), held in the lab session.
  • Week 13 = independent integrated case-study lab and project work session.
  • Week 14 = final-exam preparation; no lab.