I was pretty slow to migrate over to Positron, Posit’s new integrated development environment (IDE) for data scientists. My attachment to RStudio’s classic and reliable graphical user interface (GUI) kept me skeptical about breaking the status quo of my workflow. Why fix something if it’s not broken?
After a curious introduction to the new software, I am more than stoked I made the switch as it has a lot more to offer R users than just Python integration. I was so inspired by my (initially reluctant) switch to Positron that I decided to write up this blog post to convince fellow data enthusiasts why it is worthwhile to checkout. Positron offers many features that give it a leg up over its older sibling, RStudio. It is tailored specifically to the needs of data scientists and analysts, providing us with what we need, where we need it. I won’t go into detail on all of its bells and whistles in this blog, but I will mention a few of the key features that stood out to me:
Improved data frame/variable exploration (interactive filtering, sorting, etc.)
Better point-and-click integration with GitHub commands
Aesthetic source control and commit history layout
Multi-language support
I could go on and on about this, but that is not what this post is about. It is about the one feature that drew me in like a moth to a flame. The one feature that showed me how my day to day was about to drastically change. It is about Positron Assistant.
Positron Assistant
Positron Assistant is “an AI client that provides LLM integration within Positron, both for chat and for inline completions.” - Posit. It is Posit’s native AI coding assistant that can be powered by both Anthropic Claude and GitHub Copilot large language models (LLMs) (as of 10-30-2025). But why is Positron Assistant any better for us compared to web interface chats? Code completion and LLM chatbots are not new concepts after all.
The key is that Positron Assistant brings LLM chats directly into the IDE, which reduces the friction of copy-paste across desktop windows and also incorporates your code base and environment context (files, variables, data frames, system version, etc.) into its understanding of your requests, giving you more accurate results. More importantly, it can function as an AI Agent, meaning it can perform tasks on behalf of the user by executing code and iterating over time consuming tasks. It is honestly a bit scary.
You will need either an API key from Anthropic (paid) or a GitHub account (free tier available) to use Positron Assistant. GitHub Copilot has both code completion and chat modes available while Anthropic Claude currently only has chat. I use GtHub Copilot in this demonstration.
Functionalities
Positron Assistant offers two different main functionalities - chat and code completion. Chat is the core functionality that allows you to talk to the LLM (either in the chat pane or inline) and generate or debug code. It is similar to how you would interact with an LLM web interface, but it is integrated into Positron. Here, you can also add context to your requests by providing it relevant files and variables. There are three different modes: Ask, Edit, and Agent which have different purposes. The other functionality is code completion, which suggests code and annotations for you as you are typing them out. It is basically an autocomplete that tries to finish your lines for you.
Chat
Ask: Use this mode to ask questions, get help with debugging, or request code generation. This is the default mode when you open the chat.
Edit: Use this mode to make code changes with the model’s help. The model will suggest code changes based on your prompts, and you can apply those changes to your code.
Agent: Use this mode if you’d like Positron Assistant to determine the steps needed for your request and autonomously carry out the work. On your behalf, Positron Assistant can execute code in the Console, create and modify files, and identify the next steps based on the results of the previous steps.
Click on the Positron Assistant icon in the left-hand side Activity Bar to open the chat pane, or run Ctrl + I / Cmd + I in a script for inline chat.
Chat pane view
Inline chat view
Tip
You can provide context (files, variables, R session, etc.) by clicking on the Add Context… button in the Chat pane to give more specific detail in your requests. Dropdown arrows will also allow you to choose a mode and model.
Code completion
GitHub Copilot currently supports code completion, providing code and comment autocomplete suggestions as you type. You can either accept the completion by pressing tab or continue typing to ignore it.
Inline code completion view
Examples
Code completion is relatively straight forward and automatic, but the three different chat modes can seem a little bit confusing without seeing them in action. Let’s look at how to use each of the chat modes.
Ask
Ask mode is intended to be used to generate code, answer questions, and help debug. It is the most generally applicable mode and a good place to t. Let’s see what it can do using the popular mtcars R data set:
“Generate some exploratory data analysis figures of the mtcars dataset with ggplot2”
It responded with some nice R code which we could run directly in the chat before adding into my R script. It included a few different plots that were saved as variables and stitched together to make a {patchwork} plot shown in the Plots pane. The output not only gives you the option to copy the code but also to insert it directly into your script where your cursor is located.
Here is the code it generated, which can be easily transferred into your script or notebook:
library(ggplot2)library(dplyr)# Create visualization of relationships between mpg and key variablesp1 <-ggplot(mtcars, aes(x = wt, y = mpg)) +geom_point() +geom_smooth(method ="lm", se =FALSE) +labs(title ="MPG vs Weight", x ="Weight (1000 lbs)", y ="Miles per Gallon")p2 <-ggplot(mtcars, aes(x =factor(cyl), y = mpg)) +geom_boxplot(fill ="lightblue") +labs(title ="MPG by Cylinder Count",x ="Number of Cylinders",y ="Miles per Gallon" )p3 <-ggplot(mtcars, aes(x = hp, y = mpg, color =factor(cyl))) +geom_point() +labs(title ="MPG vs Horsepower by Cylinders",x ="Horsepower",y ="Miles per Gallon",color ="Cylinders" )# Arrange plots in a gridlibrary(patchwork)p1 + p2 + p3 +plot_layout(ncol =2) +plot_annotation(title ="Fuel Efficiency Relationships in mtcars Dataset" )
Tip
If you are asking an R Shiny specific question, start your message with @Shiny to leverage Positron Assitant’s Shiny chat participant, which is fine tuned for all things Shiny.
So far so good! I gave it a well known R dataset and an easy task. I also could have done this on the ChatGPT website for free, but I would not be able to provide the detailed context of my R environment nor quickly insert the changes in my script at the click of a button.
Why don’t we ask it about the p1 plot is just generated.
“Interpret p1 for me”
It then responded with a short summary on the figure explaining key observations and highlighting trends based on the graph. We did not have to copy and paste an image or provide any additional files. We simply pointed to an object in our R environment and it read the figure. This would be a lot higher friction to complete in a web interface.
Edit
Let’s say I wanted to change the boxplot fill color to green instead. It would also be nice if the final ggplot2 object could be saved as its own value and exported as a PNG. We could use Ask mode to do this, but Ask mode can be a little general at times and focuses more on initial code generation and big picture questions. Ask mode also provides suggestions that you have to copy over or point to where it belongs. Because we are trying to fix a specific piece of a code already generated, it would be more appropriate to use the Edit mode which will automatically change it for us. Edit mode focuses on making and inserting acute changes to your code base and less on the answering questions/suggesting code like you get in Ask mode.
Let’s try the following prompt in Edit mode:
“Write me code that will change the boxplot fill color to green and save the final plot as a PNG file named mtcars_eda.png.”
# Change boxplot fill color to greenp2 <-ggplot(mtcars, aes(x =factor(cyl), y = mpg)) +geom_boxplot(fill ="green") +labs(title ="MPG by Cylinder Count",x ="Number of Cylinders",y ="Miles per Gallon" )# Create and save the combined plotcombined_plot <- p1 + p2 + p3 +plot_layout(ncol =2) +plot_annotation(title ="Fuel Efficiency Relationships in mtcars Dataset")# Save as PNGggsave("mtcars_eda.png", combined_plot, width =12, height =8)
It successfully insterted only the code I needed to change the color and save a PNG to my working directory like I asked it to. The nice thing is that it inserted the code changes in my script by itself (which I can reject or accept). We already can see major benefits in using Positron Assistant to help us fix code compared to nteractiving with LLMs on the web. Now, let’s take a look at where the real power of Positron Assistant shines.
Agent
Finally for the scary part… Agent mode essentially lets Positron Assistant take over your IDE and perform a series of tasks autonomously upon your approval. It acts like a highly efficient coworker who will carry out necessary steps to get you the results you asked for. We will give it the following prompt which is more specific and complex than the previous two:
“Make a short quarto report asking some questions about the data that provides figures and a conclusion. Render it and name it mtcars_report.qmd”
It then responded:
“I’ll create a Quarto report that explores some key questions about the mtcars dataset. Here’s the content:”
I then watched it generate appropriate code and text inside a file called mtcars_analysis.qmd that it created. To be fair, it asked me the following prior:
“I’ll create a new task to save this as ‘mtcars_report.qmd’ and render it. You can then open the rendered HTML file to view the complete report. Would you like me to save this file and render it for you?”
After I gave it the thumbs up, it created the quarto file in my working directory and rendered it as an HTML file.
Pretty impressive, right? The agent fully took the necessary actions to create a quarto document, execute code, and render the final report without any intervention besides asking if I would like it to continue. Agent mode can be used in many different ways to automate repetitive tasks and carry out grunt work on the back burner. It is very powerful and will greatly change how we work with data.
Final thoughts
It is critical to note that Positron and the LLM’s it relies on are not perfect. They hallucinate, make simple errors, and can take a lot of iteration to yield the results you want. That is why adding context and being as specific as possible in your requests is crucial. I kept things short in this demonstration for simplicity, but you will get much better results if you provide more context and detail to the LLM. One way to do this is to create a .txt file in your directory that gives specific instructions to Positron Assistant on how you want it to behave. You can then attach this file as context to your chat.
Overall, I am feeling both excited and conflicted about the integration of LLMs into IDEs like Positron Assistant. They are remarkably powerful tools that can greatly increase efficiency and productivity, especially for repetitive tasks. You can generate and debug code quickly, carry out time intensive tasks in Agent mode, and gain new insights into improving your analytical pipelines.
However, I do see these tools pushing us towards becoming vibecoders where we end up relying heavily on LLMs to execute our work. So much of the learning and joy as an analyst comes from looking deep on Stack Overflow and GitHub for solutions. It teaches you how to think like a programmer, and I am afraid that reliance on these chatbots like Positron Assistant will change the way we work. I think that we just have to move cautiously and be intentional about how we integrate these tools into our day to day.
Other Resources
Databot
Databot is an experimental feature of Positron Assistant that specializes in data analysis tasks such as data cleaning, visualization, and exploration. I see it as a more specialized assistant that helps you crack open you data to get more insights faster. While Positron Assitant can also do this for us as we just saw, databot would be more thorough in data exploration tasks. I encourage you to try it out if you have a paid Anthropic API key as is highly rewarding. It functions quite similar to the Positron Assistant chat, so I chose to exclude a demonstration here for brevity.
Installation
Make sure you have Positron Assistant enabled to use Databot. Install Databot by choosing the Extension view from the activity bar on the left. Search for Databot and install it. Once installed, open the settings icon and acknowledge Databot: Research Preview Acknowldgement. Read more about Databot here.
Citation
BibTeX citation:
@online{hunter2025,
author = {Hunter, Raymond},
title = {An {Introduction} to {Positron} {Assistant}},
date = {2025-10-30},
url = {
---title: "An Introduction to Positron Assistant"description: "Coding more efficiently with LLMs in Posit's new IDE"author: - name: Raymond Hunter url: <https://ramhunte.github.io/date: 10-30-2025# bibliography: references.bibcitation: url: <https://ramhunte.github.io/blogs/positron_assistant/# bibliography: references.bibimage: images/positron-assistant-blue.svgcategories: [LLM] # self-defined categoriesformat: html: # code-fold: show code-copy: true code-summary: "code" code-line-numbers: false code-tools: true code-block-border-left: true # embed-resources: true warning: false message: falsetoc: truedraft: false # setting this to `true` will prevent your post from appearing on your listing page until you're ready!---I was pretty slow to migrate over to [Positron](https://positron.posit.co/), Posit's new integrated development environment (IDE) for data scientists. My attachment to RStudio's classic and reliable graphical user interface (GUI) kept me skeptical about breaking the status quo of my workflow. Why fix something if it's not broken?After a curious introduction to the new software, I am more than stoked I made the switch as it has a lot more to offer R users than just Python integration. I was so inspired by my (initially reluctant) switch to Positron that I decided to write up this blog post to convince fellow data enthusiasts why it is worthwhile to checkout. Positron offers many features that give it a leg up over its older sibling, RStudio. It is tailored specifically to the needs of data scientists and analysts, providing us with what we need, where we need it. I won't go into detail on all of its bells and whistles in this blog, but I will mention a few of the key features that stood out to me:- Improved data frame/variable exploration (interactive filtering, sorting, etc.)- Better point-and-click integration with GitHub commands- Aesthetic source control and commit history layout- Multi-language supportI could go on and on about this, but that is not what this post is about. It is about the one feature that drew me in like a moth to a flame. The one feature that showed me how my day to day was about to drastically change. It is about [Positron Assistant](https://positron.posit.co/assistant.html).<br><br>## Positron Assistant{width="20%" fig-align="center" fig-alt="Positron Assistant logo"}Positron Assistant is "***an AI client that provides LLM integration within Positron, both for chat and for inline completions.***" - [Posit](https://posit.co/). It is Posit's native AI coding assistant that can be powered by both Anthropic Claude and GitHub Copilot large language models (LLMs) (as of 10-30-2025). But why is Positron Assistant any better for us compared to web interface chats? Code completion and LLM chatbots are not new concepts after all.The key is that Positron Assistant brings LLM chats directly into the IDE, which reduces the friction of copy-paste across desktop windows and also incorporates your code base and environment context (files, variables, data frames, system version, etc.) into its understanding of your requests, giving you more accurate results. More importantly, it can function as an *AI Agent*, meaning it can perform tasks on behalf of the user by executing code and iterating over time consuming tasks. It is honestly a bit scary.::: callout-note## Install and Enable1. [Download and install Positron](https://positron.posit.co/install.html)2. [Enable Positron Assistant](https://positron.posit.co/assistant.html)You will need either an API key from Anthropic (paid) or a GitHub account (free tier available) to use Positron Assistant. GitHub Copilot has both code completion and chat modes available while Anthropic Claude currently only has chat. I use GtHub Copilot in this demonstration.:::<br><br>## FunctionalitiesPositron Assistant offers two different main functionalities - **chat** and **code completion**. **Chat** is the core functionality that allows you to talk to the LLM (either in the chat pane or inline) and generate or debug code. It is similar to how you would interact with an LLM web interface, but it is integrated into Positron. Here, you can also add context to your requests by providing it relevant files and variables. There are three different modes: *Ask*, *Edit*, and *Agent* which have different purposes. The other functionality is **code completion**, which suggests code and annotations for you as you are typing them out. It is basically an autocomplete that tries to finish your lines for you.<br>### Chat {style="text-align: center;"}------------------------------------------------------------------------::::: grid::: g-col-6- **Ask**: Use this mode to ask questions, get help with debugging, or request code generation. This is the default mode when you open the chat.- **Edit**: Use this mode to make code changes with the model’s help. The model will suggest code changes based on your prompts, and you can apply those changes to your code.- **Agent**: Use this mode if you’d like Positron Assistant to determine the steps needed for your request and autonomously carry out the work. On your behalf, Positron Assistant can execute code in the Console, create and modify files, and identify the next steps based on the results of the previous steps.------------------------------------------------------------------------*Click on the Positron Assistant icon {width="5%"} in the left-hand side Activity Bar to open the chat pane, or run `Ctrl + I` / `Cmd + I` in a script for inline chat.*:::::: g-col-6{.rounded-corners width="90%" fig-align="center" fig-alt="Positron Assistant chat modes: Ask, Edit, Agent"}{.rounded-corners width="90%" fig-align="center" fig-alt="inline chat view of Positron Assistant" style="border-radius: 5px;"}::::::::::: callout-tipYou can provide context (files, variables, R session, etc.) by clicking on the {{< iconify mdi-light:paperclip >}} **Add Context...** button in the Chat pane to give more specific detail in your requests. Dropdown arrows {{< iconify ep:arrow-down >}} will also allow you to choose a mode and model.:::<br>### Code completion {style="text-align: center;"}------------------------------------------------------------------------::::: grid::: g-col-6GitHub Copilot currently supports code completion, providing code and comment autocomplete suggestions as you type. You can either accept the completion by pressing `tab` or continue typing to ignore it.:::::: g-col-6{.rounded-corners width="90%" fig-align="center" fig-alt="code completion suggestions from Positron Assistant" style="border-radius: 5px;"}::::::::<br><br>## ExamplesCode completion is relatively straight forward and automatic, but the three different chat modes can seem a little bit confusing without seeing them in action. Let's look at how to use each of the chat modes.<br>### AskAsk mode is intended to be used to generate code, answer questions, and help debug. It is the most generally applicable mode and a good place to t. Let's see what it can do using the popular `mtcars` R data set:> *"Generate some exploratory data analysis figures of the mtcars dataset with ggplot2"*It responded with some nice R code which we could run directly in the chat before adding into my R script. It included a few different plots that were saved as variables and stitched together to make a `{patchwork}` plot shown in the Plots pane. The output not only gives you the option to copy the code but also to insert it directly into your script where your cursor is located.{.rounded-corners width="70%" fig-align="center" fig-alt="mtcars EDA plots generated by Positron Assistant"}Here is the code it generated, which can be easily transferred into your script or notebook:```{r, fig.align='center', fig.alt='mtcars EDA plots generated by Positron Assistant'}library(ggplot2)library(dplyr)# Create visualization of relationships between mpg and key variablesp1 <-ggplot(mtcars, aes(x = wt, y = mpg)) +geom_point() +geom_smooth(method ="lm", se =FALSE) +labs(title ="MPG vs Weight", x ="Weight (1000 lbs)", y ="Miles per Gallon")p2 <-ggplot(mtcars, aes(x =factor(cyl), y = mpg)) +geom_boxplot(fill ="lightblue") +labs(title ="MPG by Cylinder Count",x ="Number of Cylinders",y ="Miles per Gallon" )p3 <-ggplot(mtcars, aes(x = hp, y = mpg, color =factor(cyl))) +geom_point() +labs(title ="MPG vs Horsepower by Cylinders",x ="Horsepower",y ="Miles per Gallon",color ="Cylinders" )# Arrange plots in a gridlibrary(patchwork)p1 + p2 + p3 +plot_layout(ncol =2) +plot_annotation(title ="Fuel Efficiency Relationships in mtcars Dataset" )```::: callout-tipIf you are asking an R Shiny specific question, start your message with `@Shiny` to leverage Positron Assitant's Shiny chat participant, which is fine tuned for all things Shiny.:::<br>So far so good! I gave it a well known R dataset and an easy task. I also could have done this on the ChatGPT website for free, but I would not be able to provide the detailed context of my R environment nor quickly insert the changes in my script at the click of a button.Why don't we ask it about the `p1` plot is just generated.> *"Interpret p1 for me"*It then responded with a short summary on the figure explaining key observations and highlighting trends based on the graph. We did not have to copy and paste an image or provide any additional files. We simply pointed to an object in our R environment and it read the figure. This would be a lot higher friction to complete in a web interface.{.rounded-corners width="70%" fig-align="center" fig-alt="p1 plot interpretation from Positron Assistant"}<br>### EditLet's say I wanted to change the boxplot fill color to green instead. It would also be nice if the final `ggplot2` object could be saved as its own value and exported as a PNG. We could use *Ask* mode to do this, but *Ask* mode can be a little general at times and focuses more on initial code generation and big picture questions. *Ask* mode also provides suggestions that you have to copy over or point to where it belongs. Because we are trying to fix a specific piece of a code already generated, it would be more appropriate to use the *Edit* mode which will automatically change it for us. *Edit* mode focuses on making and inserting acute changes to your code base and less on the answering questions/suggesting code like you get in *Ask* mode.Let's try the following prompt in *Edit* mode:> *"Write me code that will change the boxplot fill color to green and save the final plot as a PNG file named mtcars_eda.png."*```{r, run = FALSE, eval = FALSE}# Change boxplot fill color to greenp2 <-ggplot(mtcars, aes(x =factor(cyl), y = mpg)) +geom_boxplot(fill ="green") +labs(title ="MPG by Cylinder Count",x ="Number of Cylinders",y ="Miles per Gallon" )# Create and save the combined plotcombined_plot <- p1 + p2 + p3 +plot_layout(ncol =2) +plot_annotation(title ="Fuel Efficiency Relationships in mtcars Dataset")# Save as PNGggsave("mtcars_eda.png", combined_plot, width =12, height =8)```It successfully insterted *only* the code I needed to change the color and save a PNG to my working directory like I asked it to. The nice thing is that it inserted the code changes in my script by itself (which I can reject or accept). We already can see major benefits in using Positron Assistant to help us fix code compared to nteractiving with LLMs on the web. Now, let's take a look at where the real power of Positron Assistant shines.<br>### AgentFinally for the scary part... *Agent* mode essentially lets Positron Assistant take over your IDE and perform a series of tasks autonomously upon your approval. It acts like a highly efficient coworker who will carry out necessary steps to get you the results you asked for. We will give it the following prompt which is more specific and complex than the previous two:> *"Make a short quarto report asking some questions about the data that provides figures and a conclusion. Render it and name it mtcars_report.qmd"*It then responded:> *"I'll create a Quarto report that explores some key questions about the mtcars dataset. Here's the content:"*I then watched it generate appropriate code and text inside a file called `mtcars_analysis.qmd` that *it* created. To be fair, it asked me the following prior:> *"I'll create a new task to save this as 'mtcars_report.qmd' and render it. You can then open the rendered HTML file to view the complete report. Would you like me to save this file and render it for you?"*After I gave it the thumbs up, it created the quarto file in my working directory and rendered it as an HTML file.{.rounded-corners width="90%" fig-align="center" fig-alt="Rendered mtcars analysis report"}Pretty impressive, right? The agent fully took the necessary actions to create a quarto document, execute code, and render the final report without any intervention besides asking if I would like it to continue. *Agent* mode can be used in many different ways to automate repetitive tasks and carry out grunt work on the back burner. It is very powerful and will greatly change how we work with data.<br><br>## Final thoughtsIt is critical to note that Positron and the LLM's it relies on are not perfect. They hallucinate, make simple errors, and can take a lot of iteration to yield the results you want. That is why adding context and being as specific as possible in your requests is *crucial*. I kept things short in this demonstration for simplicity, but you will get much better results if you provide more context and detail to the LLM. One way to do this is to create a `.txt` file in your directory that gives specific instructions to Positron Assistant on how you want it to behave. You can then attach this file as context to your chat.Overall, I am feeling both excited and conflicted about the integration of LLMs into IDEs like Positron Assistant. They are remarkably powerful tools that can greatly increase efficiency and productivity, especially for repetitive tasks. You can generate and debug code quickly, carry out time intensive tasks in *Agent* mode, and gain new insights into improving your analytical pipelines.However, I do see these tools pushing us towards becoming vibecoders where we end up relying heavily on LLMs to execute our work. So much of the learning and joy as an analyst comes from looking deep on Stack Overflow and GitHub for solutions. It teaches you how to think like a programmer, and I am afraid that reliance on these chatbots like Positron Assistant will change the way we work. I think that we just have to move cautiously and be intentional about how we integrate these tools into our day to day.<br>## Other Resources### Databot{width="20%" fig-align="center" fig-alt="Positron Assistant logo"}Databot is an experimental feature of Positron Assistant that specializes in data analysis tasks such as data cleaning, visualization, and exploration. I see it as a more *specialized* assistant that helps you crack open you data to get more insights faster. While Positron Assitant can also do this for us as we just saw, databot would be more thorough in data exploration tasks. I encourage you to try it out if you have a paid Anthropic API key as is highly rewarding. It functions quite similar to the Positron Assistant chat, so I chose to exclude a demonstration here for brevity.::: callout-note## InstallationMake sure you have Positron Assistant enabled to use Databot. Install Databot by choosing the Extension view from the activity bar on the left. Search for *Databot* and install it. Once installed, open the settings icon and acknowledge *Databot: Research Preview Acknowldgement*. Read more about Databot [here](https://positron.posit.co/databot.html).:::