Learn R Programming

covfefe (version 1.0.0)

corrupt_text: Corrupt text with specified error type

Description

Corrupt text with specified error type

Usage

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

Value

Character. Corrupted text

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)

Examples

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

Run the code above in your browser using DataLab