Summary and Schedule
This is a brief overview of AI-supported programming with GitHub Copilot in RStudio.
The material is suitable for R users who already have experience with R and want to learn how to use AI tools to support their programming in RStudio.
In the following, some possibilities are introduced on how AI tools can be used in RStudio to facilitate and accelerate programming. Basic knowledge of R is assumed.
Overview
Questions
- How do I use AI tools in RStudio?
- What AI features are available in RStudio?
- How can AI support my programming?
Objectives
- Overview of AI-supported programming possibilities in RStudio
- Practical application of AI tools for R programming
Literature
As additional reading, we recommend the official RStudio documentation on AI-supported features, since it is regularly updated with the latest information.
| Setup Instructions | Download files required for the lesson | |
| Duration: 00h 00m | 1. Getting Started with GitHub Copilot |
How do I register for a GitHub account? How can I get free GitHub Copilot access as a student? How do I set up GitHub Copilot in RStudio? |
| Duration: 00h 30m | 2. Where Do We Need AI Support? |
What types of coding tasks can benefit from AI assistance? When should we use AI coding assistants and when shouldn’t we? What are the limitations of AI-powered coding tools? |
| Duration: 00h 55m | 3. Risks, Drawbacks and Responsibilities with AI Usage |
What can go wrong when using AI coding assistants? What are my responsibilities as a developer when using AI? When is AI usage inappropriate or a no-go? What are the side effects of heavy AI reliance? Why do LLMs produce incorrect code and how can I avoid it? |
| Duration: 01h 40m | 4. RStudio Autocompletion with Copilot |
How does GitHub Copilot work as an autocompletion tool in
RStudio? What are the best practices for getting useful suggestions from Copilot? How can I accept, reject, or modify Copilot suggestions? |
| Duration: 02h 20m | 5. Context Definition and the AGENTS.md Concept |
Why is context important for AI coding assistants? What is the AGENTS.md concept?How can I define coding standards for AI agents in my R project? What are other ways to provide context to AI assistants? |
| Duration: 02h 55m | 6. Using AI within Pipelines via ellmer |
What is ellmer and how does it integrate with AI
models?How can I set up ellmer with GitHub Copilot in
RStudio?How can I use AI prompts to process data within my analysis pipelines? What are the best practices for integrating AI into data processing workflows? |
| Duration: 03h 45m | 7. Understanding and Setting LLM Parameters |
How do large language models generate responses? What parameters control LLM behavior? How can I adjust LLM parameters to improve result quality? How do I set parameters when using ellmer?
|
| Duration: 04h 25m | 8. Revise Your Code with AI |
How can I use AI to check and improve my code? What are effective strategies for code review with AI assistants? How do I use chat interfaces for iterative code refinement? When should I trust AI suggestions for code revisions? |
| Duration: 05h 05m | 9. GitHub Issue-Driven Coding with Copilot |
What is GitHub issue-driven coding with Copilot? How can I use GitHub issues to guide AI-assisted development? What are the best practices for working with Copilot on GitHub issues? How do I effectively communicate tasks to Copilot through issues? |
| Duration: 05h 45m | 10. Wrap-Up and Next Steps |
What are the key best practices for AI-supported coding? What additional AI applications exist beyond what we covered? How can I stay current with rapidly evolving AI tools? |
| Duration: 06h 05m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Setup
This lesson introduces AI-supported coding tools in RStudio, specifically focusing on GitHub Copilot and other AI assistants. To participate in this lesson, you will need to set up the required software and accounts.
Software Requirements
R
You will need a recent version of R installed on your computer. We recommend:
- R version 4.2.0 or later
Download R from CRAN.
RStudio
You will need a recent version of RStudio with GitHub Copilot support:
- RStudio version 2024.02 or later (required for GitHub Copilot integration)
Download RStudio from Posit.
Why RStudio 2022.02 or later?
GitHub Copilot integration in RStudio was introduced in version 2022.02. Earlier versions do not support the Copilot extension, which is essential for this lesson.
Optional: R Packages
Some chapters in this lesson use additional R packages. These will be introduced as needed during the lesson, but you may want to install them in advance:
R
# For data manipulation (used in examples)
install.packages("tidyverse")
# For AI integration in pipelines (Chapter: Using AI within Pipelines)
install.packages("ellmer")
About the ellmer Package
The ellmer package provides interfaces to various AI
models directly from R. While this is covered in detail in a later
chapter, having it pre-installed will save time during the lesson.
Setup Verification
Before the lesson begins, verify your setup:
-
Check R version:
R
R.version.stringShould show R version 4.2.0 or later.
-
Check RStudio version:
- Open RStudio
- Go to
Help→About RStudio - Verify the version is 2024.02 or later
Getting Help
If you encounter issues with setup:
- Refer to the RStudio documentation for RStudio-specific questions
- Contact the instructors before the lesson if you have persistent setup problems
What’s Next?
Once your setup is complete, you’re ready to start the lesson! The first chapter, Getting Started with GitHub Copilot, will guide you through:
- Registering for GitHub (if you haven’t already)
- Applying for the GitHub Student Developer Pack
- Installing and configuring GitHub Copilot in RStudio
- Testing that everything works correctly
We look forward to exploring AI-supported coding with you!