linebreak: Format paragraphs

Description Usage Arguments Value

View source: R/utils.R

Description

Similar to strwrap but returns a single string with linefeeds inserted

Usage

1
2
linebreak(s, width = getOption("width") - 2, indent = 0, offset = 0,
  split = " ", FORCE = FALSE, FULL_FORCE = FALSE)

Arguments

s

a character vector.

width

a positive integer giving the column for inserting linefeeds

indent

an integer giving the indentation of the first line of the paragraph; negative values of indent are allowed and reduce the width for the first line by that value.

offset

a non-negative integer giving the indentation of all but the first line.

split

regular expression used for splitting. Defaults to whitespace.

FORCE

Words are force-split if the available width is too small.

FULL_FORCE

Lines are split exactly at the specified width irrespective of whether there is whitespace or not.

Value

a character vector


biofiles documentation built on May 2, 2019, 3:31 p.m.