powered by
Generates a text summary of R objects to be used as context for the LLM.
get_r_context(vars, envir = parent.frame())
A single string containing the summaries of the requested variables.
Character vector of variable names to include.
The environment to look for variables in. Default is parent.frame().
# \donttest{ if (interactive()) { df <- data.frame(x = 1:10, y = rnorm(10)) context <- get_r_context("df") cat(context) } # }
Run the code above in your browser using DataLab