How to use this book
The chapter pattern
Every chapter follows the same structure:
- Chapter goals — what you will be able to do by the end.
- Expected output callout — the concrete deliverable for the chapter assignment.
- Where we are — how this chapter connects to the previous one.
- Excel-to-R bridge (from Chapter 4 onward) — every Excel pattern paired with its R equivalent.
- Core content — concepts and demonstrations.
- Active learning — 5–6 short activities to try immediately.
- Group lab activity — a single longer task designed for a lab session, often in groups of 3–4.
- Exercises — 6–8 take-home exercises.
- Optional, advanced — material for learners who want to go deeper.
- Glimpse of the next chapter — a forward-looking preview.
- Self-assessment quiz — 20 questions with instant feedback.
- AI as a debugging companion — when to use AI, how to prompt it, and when not to.
- Reading — references, including a mix of canonical and diverse sources.
- 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:
- Re-read the relevant chapter section. The chapter has the answer in 70% of cases.
- Search the chapter’s Instructor notes callout for “Common stumbling points”.
- Read the error message carefully — R error messages are often more helpful than they look on first read.
- Ask a classmate — a peer who solved the same problem 30 minutes ago is often the fastest help.
- Office hours, course site discussion forum, or email the TA.
- 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
bcfrombc_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.
Recommended pacing
The book is designed for a one-term course (twelve numbered chapters of content; the last is final-exam preparation). A reasonable pace is one chapter per week, with the lab session for each chapter being the in-class hands-on time.
- Chapters 1–3 (Excel): 3 weeks
- Chapters 4–5 (R foundations, Quarto): 2 weeks
- Chapters 6–8 (dplyr, summarising, joining): 3 weeks
- Chapter 9 (ggplot2): 1 week
- Chapter 10 (integrated case study): 1 week
- Optional: spatial analysis (
sf,leaflet) — extension material - Chapter 11 (presentations + portfolio): 1 week
- Chapter 12 (review + final-exam preparation): 1 week
For FRST 531 (graduate students), the same material can be compressed into 10 weeks with Chapters 1–3 (Excel) treated as a one-week refresher.
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.