Learn R Programming

gooseR (version 0.1.2)

format_ai_response: Format AI response text for better display in R console

Description

Format AI response text for better display in R console

Usage

format_ai_response(
  text,
  width = 80,
  indent = 0,
  preserve_code = TRUE,
  color = TRUE
)

Value

Formatted text (invisibly), printed to console

Arguments

text

Character string with AI response

width

Integer, line width for wrapping (default 80)

indent

Integer, spaces to indent wrapped lines (default 0)

preserve_code

Logical, whether to preserve code blocks (default TRUE)

color

Logical, whether to use color output (default TRUE)