lorem_text: Get gibberish text in various scripts

View source: R/lorem_text.R

lorem_textR Documentation

Get gibberish text in various scripts

Description

Textshaping exists partly to allow all the various scripts that exists in the world to be used in R graphics. This function returns gibberish filler text (lorem ipsum text) in various scripts for testing purpose. Some of these are transliterations of the original lorem ipsum text while others are based an a distribution model.

Usage

lorem_text(
  script = c("latin", "chinese", "arabic", "devanagari", "cyrillic", "kana", "hangul",
    "greek", "hebrew", "armenian", "georgian"),
  n = 1
)

lorem_bidi(
  ltr = c("latin", "chinese", "devanagari", "cyrillic", "kana", "hangul", "greek",
    "armenian", "georgian"),
  rtl = c("arabic", "hebrew"),
  ltr_prop = 0.9,
  n = 1
)

Arguments

script

A string giving the script to fetch gibberish for

n

The number of paragraphs to fetch. Each paragraph will be its own element in the returned character vector.

ltr, rtl

scripts to use for left-to-right and right-to-left text

ltr_prop

The approximate proportion of left-to-right text in the final string

Value

a charactor vector of length n

References

https://generator.lorem-ipsum.info

Examples

# Defaults to standard lorem ipsum
lorem_text()

# Get two paragraphs of hangul (Korean)
lorem_text("hangul", 2)

# Get gibberish bi-directional text
lorem_bidi()


textshaping documentation built on April 4, 2025, 5:24 a.m.