Using GitHub Copilot (and other LLM) with R

Yani Bellini Saibene

Who I’m ? :-)

AI-Assisted Programing

the use of artificial intelligence (AI) technologies to aid developers in writing, testing and debugging code.

Generative Artificial Intelligence -> Large Language Models

GitHub Copilot

1.8 million paid developers in addition to the 1 million students, teachers, and open-source maintainers that use GitHub for free.

  • You can choose between: Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview and o1-mini.

  • You can use it on GitHub.com or in your IDE.

GitHiub Copilot on GitHub

Demo with RStudio

New package!

Post by @Posit@fosstodon.org
View on Mastodon

Some tips to use GitHub copilot

  • Describe what you need with detail. You can especify what package you want to use if you know it.
  • Break down the problem into smaller steps (the scope of a function is a good unit)
  • Always verify and debug the code.
  • Use more than one model and feed one model with the code of the other.

Some considerations

AI Skill Threat

Is emerging as a risk to developer experience.

  • 45% of developers showed evidence of worry, anxiety and fear about whether they could succeed in this era with their current technical skill set.

  • 60% of developers reported AI tools were already being used either by their immediate team or individual work.

AI Skill Threat

Is emerging as a risk to developer experience.

  • 74% of software developers are planning to upskill in AI-assisted coding. However,there are important emerging equity gaps,with female developers and LGBTQ+ developers reporting significantly lower intent to upskill.

  • 56% of Racially Minoritized developers reported a negative perception of AI Quality,compared with 28% of all developers.

AI Skill Threat

What can we do ?

  • Create spaces for open, honest communication around AI tool use and AI Skill Threat.

  • Invest in broad access, governance, and guidance on AI tool use to teams.

    • This include training.

Some of this ideas apply to students

  • They will use it whether I want to or not.

  • Help them to understand de tool.

    • Discuss their issues (fairness, how they are build, access, enviroment)
  • Help them (and us) to use it efficiently.

More resources

Contact info

Thank you!!!