stri_rand_lipsum | R Documentation |
Generates (pseudo)random lorem ipsum text consisting of a given number of text paragraphs.
stri_rand_lipsum(n_paragraphs, start_lipsum = TRUE, nparagraphs = n_paragraphs)
n_paragraphs |
single integer, number of paragraphs to generate |
start_lipsum |
single logical value; should the resulting text start with Lorem ipsum dolor sit amet? |
nparagraphs |
[DEPRECATED] alias of |
Lorem ipsum is a dummy text often used as a source of data for string processing and displaying/lay-outing exercises.
The current implementation is very simple: words are selected randomly from a Zipf distribution (based on a set of ca. 190 predefined Latin words). The number of words per sentence and sentences per paragraph follows a discretized, truncated normal distribution. No Markov chain modeling, just i.i.d. word selection.
Returns a character vector of length n_paragraphs
.
Marek Gagolewski and other contributors
The official online manual of stringi at https://stringi.gagolewski.com/
Gagolewski M., stringi: Fast and portable character string processing in R, Journal of Statistical Software 103(2), 2022, 1-59, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v103.i02")}
Other random:
stri_rand_shuffle()
,
stri_rand_strings()
cat(sapply(
stri_wrap(stri_rand_lipsum(10), 80, simplify=FALSE),
stri_flatten, collapse='\n'), sep='\n\n')
cat(stri_rand_lipsum(10), sep='\n\n')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.