View source: R/optimize_code.R
optimize_code | R Documentation |
ChatGPT: Optimize Code
optimize_code(code = clipr::read_clip(allow_non_interactive = TRUE))
code |
The code to be optimized by ChatGPT. If not provided, it will use what's copied on the clipboard. |
A character value with the response generated by ChatGPT.
## Not run:
cat(optimize_code("i <- 10\nwhile (i > 0) {\n i <- i - 1\n print(i)\n}"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.