This is an RStudio addin function that should become available after the package is installed.
Details
Highlight text in an editor window while using Rstudio, then select the addin from the drop-down menu.
This function sends the selected text to a davinci model
The model receives the highlighted text, generates a completion prompt, and returns the generated text to the console.