knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) set.seed(424342)
Quickly generate lorem ipsum placeholder text with lorem::ipsum()
.
Easy to integrate in RMarkdown documents.
Includes an RStudio addin to insert lorem ipsum into the current document.
You can install the latest released version of lorem from CRAN
install.packages("lorem")
or the current development version of lorem from GitHub or r-universe
# GitHub # install.packages("remotes") rmeotes::install_github("gadenbuie/lorem") # R Universe install.packages('lorem', repos = c('https://gadenbuie.r-universe.dev', 'https://cloud.r-project.org'))
lorem includes a simple addin for RStudio that adds placeholder lorem ipsum text to the current source document. The addin allows you to specify the number of desired paragraphs and sentences.
Another way to generate lorem ipsum placeholder text is to call
lorem::ipsum()
in an inline R chunk in R Markdown.
`r knitr::inline_expr("lorem::ipsum(paragraphs = 2)")`
r paste(">", lorem::ipsum(2), collapse = "\n>\n")
You can control the number of paragraphs
and sentences
per paragraph.
`r knitr::inline_expr("lorem::ipsum(paragraphs = 3, sentences = c(1, 2, 3))")`
r paste(">", lorem::ipsum(3, 1:3), collapse = "\n>\n")
You can also adjust the avg_words_per_sentence
to create long or short paragraphs.
`r knitr::inline_expr("lorem::ipsum(2, avg_words_per_sentence = 3)")`
r paste(">", lorem::ipsum(paragraphs = 2, avg_words_per_sentence = 3), collapse = "\n>\n")
`r knitr::inline_expr("lorem::ipsum(1, avg_words_per_sentence = 20)")`
r paste(">", lorem::ipsum(1, 2, avg_words_per_sentence = 20), collapse = "\n>\n")
Generate lorem ipsum anywhere else using lorem::ipsum()
or lorem::ipsum_words()
.
ipsum_items <- replicate(5, lorem::ipsum_words(5)) cat(paste("-", ipsum_items), sep = "\n")
Thank you to Luke Haas for the node module getlorem and for providing the lorem ipsum word list used in this package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.