7  AI coding help

There is a lot of hype around tools like chatGPT which is a class of large language models (LLM's) for usingnatural language inputs to answer questions, including how to write code.

7.1 Install chatGPT Rstudio add in

7.1.1 Prerequisites

  • Make an OpenAI account.
  • Create an OpenAI API key to use with the package.
  • Set the API key up in Rstudio
# install.packages(c("gptstudio","waiter"))
# library(gptstudio)

7.2 chatGPT Rstudio add in

Try to ask the openAI LLM how it would code up some of the examples you have seen so far. Try running the code, giving feedback about any errors to the chatbot and see if you can customize and/or improve the code you have seen so far.

7.3 Appendix