whatis | R Documentation |
Ask OpenAI to explain what given R code does. The answer is written to console and returned as a string.
whatis(this, call_api = call_openai)
this |
Character string of code to be explained |
call_api |
Optional function to call another API |
Invisible character string of explanation
# You must provision an OpenAI API key before using this function.
## Not run:
whatis("paste0(vector1, vector2)")
whatis("length(x) %% 2 == 1 ? x[(length(x) + 1) / 2] : NA")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.