Module 3: AI Assistant Setup & Demo
AI-Powered Coding and Data Analysis
Exercise: Download ZIP
You should already have RStudio or Positron installed.
- Ensure you have at least one AI agent/assistant set up:
- Posit AI in RStudio or Positron: sign up for a Posit AI Pass ($5 for the first month; there is no longer a free trial), then follow the getting started guide.
- Claude Code, with a paid Claude account: setup.
- Codex, with a paid ChatGPT account: setup.
- Other model providers: Fireworks AI is a pay-as-you-go provider that doesn’t store your prompts or outputs by default. OpenCode Go is a popular low-cost alternative, and Posit AI supports it directly.
- Download the exercise above and open it: its
.Rprojfile in RStudio, or the folder in Positron. - In the R console, run
source("setup.R"). It installs every package the workshop uses, so you only run it once. The other modules’ projects don’t need it again. - Render
notebooks/01_cleaning.qmd. It’s empty for now. If it renders, the setup works.
Posit AI in RStudio
- Open RStudio.
- Click the Posit Assistant icon in the toolbar.
- Install Posit AI if prompted.
- Trust the workspace and sign in.
Demo prompt
With the project open in your assistant, send this prompt:
Explore this project and its codebook, clean the data, and save a prepared dataset to inputs/final/. Then create a Quarto notebook with useful summaries and one clear figure. Explain your choices and the limitations of the results.
Make reasonable decisions and carry the work through without stopping to ask me questions. Keep the raw data unchanged. Run the code, fix any errors, and render the notebook. Tell me what you did and what I should check.Project files
- Each module’s project is a standalone analysis project.
- Open the GitHub repository linked on the course page. Use Code → Download ZIP, or clone the repository.
- Open the project’s
.Rprojfile in RStudio, or open the folder in Positron. - Start Claude Code or Codex from a terminal in the project folder.