Usage
random_sent(n = 10, len = 14, range = len - 1,
dictionary = qdapDictionaries::Top200Words, endmark.fun = function()
sample(c(".", "!", "|", "?"), 1, prob = c(0.85, 0.05, 0.05, 0.05)))
random_data(n = 10, ..., n.people = 10, ages = 7:10,
people.names = unique(tolower(qdapDictionaries::NAMES[[1]])))
Arguments
n
Number of sentences to create.
len
Average length of sentences (in words).
range
Range around len
that number of words may vary. This may
be a recycled single integer vector or an integer vector of length 2.
dictionary
A dictionary of words to sample from.
endmark.fun
A function to create random end marks.
...
Other arguments passed to random_sent
n.people
An integer of the number of people to include in the sample
(number of people is sampled from; if n
is smaller not all people may
be included).
ages
The possible ages to choose from (numeric).
people.names
A vector of names to choose from at least as large as
n.people
.