Integrating Generative AI into R Workflows: From APIs to Shiny Apps
Welcome

This online resource shares materials from the “Integrating Generative AI into R Workflows: From APIs to Shiny Apps” workshop, first presented at the inaugural AIMECON meeting in October, 2025, and later at NCME Annual Meeting in Los Angeles in April 2026 and AIMECON in October 2026.
The workshop assumes some working knowledge of the R programming language, and assumes little generative AI knowledge. If you need more information on using R, I highly recommend Hadley Wickham’s (free) R for Data Science.
How to Use This Site
Begin with Setup to prepare R and your API access. The next sections introduce generative AI and its parameters before moving into practical R workflows, including conversations, batch processing, and chained prompts. The final section uses Shiny and AI-assisted coding to build interactive applications.
Read in order for the workshop experience, or use the sidebar to return to a specific topic. Activities and downloadable notebooks are included throughout; some examples call external model APIs and may use your account’s credits.
This website is licensed under the CC BY-NC-ND 4.0 License.
Changes to the book last made on:
2026-10-13 01:21:59 (GMT)
Learning Objectives
By the end of this workshop, participants will be able to:
- Explain key LLM architectural features that inform effective integration practices
- Implement both conversational and transactional API interactions with LLMs from R
- Design and deploy simple chained prompt workflows for complex tasks
- Build interactive Shiny applications that leverage LLM capabilities for end-user functionality
📥 Download All Activity Notebooks
⚠️ Privacy Reminder
Please don’t enter personal, confidential, proprietary, or otherwise sensitive information into generative AI tools. Before using an AI service in an operational setting, consult your organization’s IT, privacy, and legal guidance, and verify the provider’s data-use terms.
⚖️ Legal Disclaimer
The information provided in this resource is for general informational purposes only and does not constitute legal advice. You should not act upon any information presented without first seeking qualified legal counsel regarding your specific situation. The author disclaims any liability for actions taken based on the content provided here.