Learn R Programming

koRpus (version 0.10-2)

jumbleWords: Produce jumbled words

Description

This function takes either a character vector or objects inheriting class kRp.tagged (i.e., text tokenized by koRpus), and jumbles the words. This usually means that the first and last letter of each word is left intact, while all characters inbetween are being randomized.

Usage

jumbleWords(words, min.length = 3, intact = c(start = 1, end = 1))

Arguments

words

Either a character vector or an object inheriting from class kRp.tagged.

min.length

An integer value, defining the minimum word length. Words with less characters will not be changed.

intact

A named vector with the two integer values named start and stop. These define how many characters of each relevant words will be left unchanged at its start and its end, respectively.

Value

Depending on the class of words, either a character vector or tagged text object.