createRcode | R Documentation |
Reads text from the clipboard and generates R code based on the given input, printing the result to the R console.
createRcode(
Summary_nch = 100,
Model = "gpt-4o-mini",
SelectedCode = TRUE,
verbose = TRUE,
SlowTone = FALSE
)
Summary_nch |
The maximum number of characters for the summary. |
Model |
The model to be used for code generation, default is "gpt-4o-mini". |
SelectedCode |
A logical flag to indicate whether to read from RStudio's selected text. Default is TRUE. |
verbose |
A logical value indicating whether to print the result to the console, default is TRUE. |
SlowTone |
A logical value indicating whether to print the result slowly, default is FALSE. |
Create R Code from Selected Text or Clipboard Content
This function reads text from your selected text or clipboard, interprets it as a prompt, and generates R code based on the given input. The generated R code is then printed to the R console with optional slow printing. This function can be executed from RStudio's Addins menu.
Prints the generated R code to the R console.
This function can be added to RStudio's Addins menu for easy access.
Satoshi Kume
## Not run:
# Copy the origin of R code to your clipboard then execute from RStudio's Addins.
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.