View source: R/createRfunction.R
createRfunction | R Documentation |
This function reads text either from your selected text in RStudio or from the clipboard, interprets it as a prompt, and generates an R function based on the given input. The generated R code is then printed into the source file or the R console with optional slow printing.
createRfunction(
Model = "gpt-4o-mini",
SelectedCode = TRUE,
verbose = TRUE,
SlowTone = FALSE
)
Model |
A character string representing the model to be used. Default is "gpt-4o-mini". |
SelectedCode |
A logical value indicating if the selected text should be used as input. Default is TRUE. |
verbose |
A logical value indicating if progress should be printed. Default is TRUE. |
SlowTone |
A logical value indicating if slow printing should be used. Default is FALSE. |
Create R Function from Selected Text or Clipboard Content
This function returns the generated R code as a clipboard content if SelectedCode is FALSE.
Satoshi Kume
## Not run:
#Copy the idea text of the R function to your clipboard and run this function.
createRfunction(SelectedCode = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.