randomSentences: generate n random sentences with a given or random number of...

View source: R/utils.r

randomSentencesR Documentation

generate n random sentences with a given or random number of words

Description

generate n random sentences with a given or random number of words

Usage

randomSentences(n, nwords, maxchar = Inf)

Arguments

n

number of sentences to be generate (integer)

nwords

number of words per sentence. If vector each sentence lengths is randomly drawn from the vector

maxchar

maximal number of characters per sentence. Note that whole words (not part of words) are excluded if the maximal number is exceeded.

Value

a vector with n random sentences

Examples

randomSentences(5, 10) # five random sentences with ten words each
randomSentences(5, 2:10) # five random sentences between two and ten words

markheckmann/OpenRepGrid documentation built on April 14, 2024, 8:15 a.m.