substring.with.dots: To pad dots (or other text) to tables for improved...

View source: R/table-dots-functions.R

substring.with.dotsR Documentation

To pad dots (or other text) to tables for improved readability.

Description

Objective: truncate string to n chars and pad with dots in front behind depending on reverse. Example:

substring.with.dots("Hello")

gives the following output:

"Hello .............."

See also table.dots and substring.with.dots.adv.

Usage

substring.with.dots("Hello")

Arguments

x

is a vector of input values

n

combined length (incl. dots)

reverse

(FALSE = x then dots, TRUE = dots then x)

st

is the dot-character (i.e. normally ".").

Value

string (vectorized)

Author(s)

Claus E. Andersen


claus-e-andersen/clanTools documentation built on Nov. 30, 2024, 11:06 p.m.