apply_word_wrap: Apply word-wrap to text, recognizing whitespace and some...

apply_word_wrapR Documentation

Apply word-wrap to text, recognizing whitespace and some punctuation

Description

Apply word-wrap to text, recognizing whitespace and some punctuation

Usage

apply_word_wrap(x, width = 15, sep = "\n", ...)

Arguments

x

character string or vector.

width

numeric desired maximum character width

sep

character string used as a separator between wrapped subsets, default "\n" wraps to new lines. When sep=NULL the wrapped subsets are not combined, instead are returned as a list of character vectors.

...

additional arguments are ignored.

Value

character vector by default, however when sep=NULL it returns a list of character vectors.

Examples

x <- c("logFC dH1A_VEH_ATAC-UL3_VEH_ATAC",
   "logFC dH1A_VEH_ATAC_UL3_VEH_ATAC",
   "one-two-three-four-five-six-seven")
cat(apply_word_wrap(x), sep="\n--\n")

apply_word_wrap(x, sep=NULL)


jmw86069/platjam documentation built on April 12, 2025, 1:41 p.m.