View source: R/codeConverter.R
codeConverter | R Documentation |
This function takes a snippet of code and translates it from one programming language to another using 'Groq API'. The default behavior is to read the code from the clipboard and translate from R to Python.
codeConverter(code = NULL, from = "R", to = "Python", ...)
code |
A string containing the code to be translated. If not provided, the function will attempt to read from the clipboard. |
from |
any programming language. Defaults to "R". |
to |
any programming language. Defaults to "Python". |
... |
Following arguments can be set manually or in .Renviron:
|
A string containing the translated code.
## Not run:
codeConverter("z <- function(x) scale(x)^2", from = "R", to = "Python")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.