goose_explain_error: Explain R Error with AI

View source: R/ai_assistant.R

goose_explain_errorR Documentation

Explain R Error with AI

Description

Get AI-powered explanation and solution for R errors.

Usage

goose_explain_error(error = NULL, code = NULL, context = NULL)

Arguments

error

The error object or error message

code

Optional code that caused the error

context

Optional context about what you were trying to do

Value

List with explanation and suggested solutions

Examples

## Not run: 
# Explain last error
tryCatch({
  data.frame(x = 1:3, y = 1:4)
}, error = function(e) {
  explanation <- goose_explain_error(e)
  print(explanation)
})

## End(Not run)

gooseR documentation built on Feb. 6, 2026, 5:07 p.m.