Course Overview
Hands-on guide to integrating ChatGPT with R for real research workflows—API setup, prompt pipelines, Shiny integrations, reproducible reporting, and safeguards. Build fast assistants for coding, EDA, documentation, and knowledge search—right inside RStudio/Posit.
Learning Outcomes
- Set up secure API access in R (keys, env vars, rate limits)
- Call Chat/Embeddings endpoints using {openai} or {httr2}; parse JSON and handle errors.
- Use RStudio add-ins (e.g., {gptstudio}) to draft code, refactor, and document within the IDE.
- Create prompt chains for EDA, plotting specs, and code reviews; log prompts/outputs for reproducibility.
- Conduct Parametric and non-Parametric tests using Chat GPT
- Implement basic RAG in R (embeddings, vector search over local notes/papers) to ground model responses.
- Leverage ChatGPT in R to accelerate routine research tasks (coding help, summaries, draft prose) while keeping human oversight.
Tools & Resources
R, RStudio/Posit, httr2, openai, gptstudio, shiny, plumber, quarto, tidytext, text2vec, ggplot2.