Skip to contents

Generate a sample of "Harvard sentences", wrapping to an exact column width if desired.

Usage

sample_text(n, wrap = NULL)

Arguments

n

number of sentences to return, or number of lines if wrap is not NULL

wrap

column to wrap text at, optional

If wrap is specified, text is wrapped exactly at that column, disregarding language. Lines are rearranged at random after filtering out lines with leading or trailing space.

Examples

sample_text(3)
#> [1] "There was a sound of dry leaves outside."   
#> [2] "Three for a dime, the young peddler cried." 
#> [3] "The price is fair for a good antique clock."
sample_text(3, wrap = 42)
#> [1] "s are paved with sticky tar. Those thistle"
#> [2] "e meter says. The key you designed will fi"
#> [3] ". Breathe deep and smell the piny air. Bir"