8 ChatGPT tools for R programming
Without fine-tuning or being trained on a specific topic, ChatGPT can answer questions about a wide range of technology subjects—including how to write R code. That means ChatGPT’s power is available to any R programmer, even one who knows little about large language models. (A large language model, or LLM, is the technology underpinning AI chatbots like OpenAI’s ChatGPT.)
An ecosystem is forming around ChatGPT and R, making it easy to incorporate the AI technology into your R language workflow. But before you begin using ChatGPT and tools associated with it for projects in R, there are a few important things to keep in mind:
- Everything you ask with these tools gets sent to OpenAI’s servers. Don’t use ChatGPT tools to process sensitive information.
- ChatGPT may confidently return answers that are wrong. Even incorrect responses can be a time-saving starting point, but don’t assume the code will do exactly what you expect. Kyle Walker, an associate professor at Texas Christian University and author of the popular
tidycensus
R package, recently tweeted that ChatGPT can “supercharge your work if you understand a topic well,” or it can leave you “exposed for not knowing what you are doing.” The difference is in knowing when the AI output isn’t right. Always check ChatGPT’s responses.- ChatGPT can generate different responses to the same query—and some answers might be accurate while others aren’t. For instance, when I asked multiple times for a
ggplot2
bar chart with blue bars, the code generated a graph with blue bars sometimes but not others, even though I submitted the exact same request. This is obviously less than ideal if you need a reproducible workflow.- If there’s been a recent update to a package you’re using, ChatGPT won’t know about it, since its training data ends in 2021.
- Most of the resources in this article require you to have your own OpenAI API key, and the API isn’t free to use. While pricing is low at the moment, there’s no guarantee it will stay that way. Current pricing is 0.2 cents per 10,000 tokens for the ChatGPT 3.5 turbo model. What does a token get you? As one example, the request to create a scatter plot from a 234-row mpg data set cost 38 tokens, a fraction of a cent.
- Asking ChatGPT for coding help is unlikely to ensnare you in the ethics of AI racial and gender bias. However, there are heated discussions about the wisdom of furnishing OpenAI with yet more data; the ethics of how the training data was scraped and repurposed; and if it’s better to use open source large language models (such as H2O.ai’s h2oGPT) rather than OpenAI’s. Those dilemmas are for every individual and organization to parse for themselves. However, as of this writing, there simply aren’t R-specific LLM tools that are comparable to those building up around ChatGPT.
Now, let’s look at some of the most notable R-focused ChatGPT resources currently available.
Author: . [Source Link (*), InfoWorld]