whatis {air} | R Documentation |
Ask OpenAI to explain what given R code does. The answer is written to console and returned as a string.
Description
Ask OpenAI to explain what given R code does. The answer is written to console and returned as a string.
Usage
whatis(this, call_api = call_openai)
Arguments
this |
Character string of code to be explained |
call_api |
Optional function to call another API |
Value
Invisible character string of explanation
Examples
# 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)
[Package air version 0.2.2 Index]