corrupt_text: Corrupt text with specified error type

View source: R/corrupt.R

corrupt_textR Documentation

Corrupt text with specified error type

Description

Corrupt text with specified error type

Usage

corrupt_text(text, type = "random", position = NULL)

Arguments

text

Character. Text to corrupt

type

Character. Type of corruption: "keyboard", "phonetic", "double", "truncate", "swap", "omit", "random"

position

Integer. Position for positional corruptions (NULL = random)

Value

Character. Corrupted text

Examples

set.seed(42)
corrupt_text("hello", type = "keyboard")
corrupt_text("coverage", type = "truncate", position = 3)

covfefe documentation built on Jan. 26, 2026, 5:08 p.m.