Generate AI Summary for an R Object via OpenRouter
Usage
get_summary(object, aggregate_list = TRUE)
Arguments
- object
The R object to summarize (text, data.frame, ggplot, etc.).
- aggregate_list
Logical; if TRUE (default) and object is a list, aggregate all items for an integrated summary. If FALSE, falls back to default list handling (printing the list).
Value
A character string: the AI-generated summary or an error message.
Examples
if (FALSE) { # \dontrun{
Sys.setenv(OPENROUTER_API_KEY = "<your_key>")
get_summary(mtcars)
get_summary("Some text to summarize.")
get_summary(list(mtcars, iris), aggregate_list = TRUE)
} # }