Learn R Programming

gooseR (version 0.1.2)

goose_clean_text: Get copy-friendly version of formatted text

Description

Removes formatting artifacts and returns clean text for copying

Usage

goose_clean_text(text, preserve_markdown = TRUE)

Value

Clean text suitable for copying

Arguments

text

Character string with formatted text

preserve_markdown

Logical, keep markdown formatting (default TRUE)

Examples

Run this code
if (FALSE) {
response <- goose_ask("What is R?")
# Copy-friendly version:
clean <- goose_clean_text(response)
cat(clean)
}

Run the code above in your browser using DataLab