Useful Links & Workshop Materials
◆ Purple navigation items are Student Activities. Section 6 extends the PISA examples; Section 7 introduces more graph types.
How to use this course
Installing R and RStudio is optional, but we strongly encourage you to install both. You can also run the examples directly in this browser.
- Choose a lesson and read the example.
- Use Try in R Workspace, then Run. The browser automatically downloads R and the required packages on first use; keep this tab open while it prepares.
- Edit the code and run it again. No GitHub account or project download is needed.
- For AI help, review and copy your prepared question, open an external AI website, and paste it there. A separate AI account may be required.
- Download your script, plots or exported data if you want to keep them. The session and edits are temporary and reset when the page reloads or closes.
Use a current desktop browser and an internet connection. If preparation fails, check the connection and retry. Downloadable datasets and R examples are optional for studying outside this site.
Can you catch the AI's mistake?
The original Math_Overall column has no missing scores. This exercise creates challenge_data, a separate copy with three scores replaced by NA.
Predict the result, then choose Run R in the workspace.
Deliberately incorrect AI claim
“The mean is NA, so every student's math score must be missing.”
2 · What is wrong with this claim?
Check your reasoning
Read, try, and question · Purdue lesson
Ctrl/⌘ + Enter runs the selection, or the current line if nothing is selected. Ctrl/⌘ + Shift + Enter runs all. Select every line of a multiline command; incomplete selections produce R errors. Objects persist between runs. Download your edits before closing.
Select Run R to start. The first run downloads R; later runs use the same session.
This opens the question builder below; it does not send data or generate an answer.
Environment preparation & file export
No desktop R installation is needed. The first data lesson downloads the real haven/readxl packages into this browser session. Preparation must finish before the lesson can run; a failed download is a setup issue, not an exercise error.
Restoring a data lesson reloads its sample and listed prerequisite objects. Other objects remain. Run does this once on entering a lesson, then preserves your changes within that lesson. Download files before closing; this session is temporary.
Export a file saved with write.csv(), write_sav(), or pdf():
A restart clears R objects and restores the supplied data. For a stuck run, Restart R terminates the worker; it does not preserve R objects.
AI Learning Assistant
Use prepared lesson guidance here, or build a focused question for a conversation on an external AI website.
One hint at a time
Prepared lesson guidanceThese hints explain the selected lesson question. They do not interpret arbitrary edits or answer free-text questions. They are written in advance, not generated by AI.
Hint
Starter code may contain ____ for you to complete. Replacing the editor does not run code. Use Undo to recover your previous code.
What this guidance uses
Your question is prepared here. The AI answers on its own website. This page has no connected generative AI. Nothing is sent when you type or prepare a question.
5 · Bring the advice back. Run it. Check it.
A useful follow-up when the answer is unclear
“Your suggestion runs, but I do not yet understand [specific step]. Explain what it changes, why it is needed for my goal, and how I can check it before continuing. Please keep the approach understandable and explain any new package.”
AI advice is a proposal to inspect. Successful execution alone does not establish that the analysis answers your research question.