Learn R Programming

gooseR (version 0.1.2)

goose_explain_error: 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)

Value

List with explanation and suggested solutions

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

Examples

Run this code
if (FALSE) {
# Explain last error
tryCatch({
  data.frame(x = 1:3, y = 1:4)
}, error = function(e) {
  explanation <- goose_explain_error(e)
  print(explanation)
})
}

Run the code above in your browser using DataLab