Learn R Programming

biofiles (version 1.0.0)

linebreak: Format paragraphs

Description

Similar to strwrap but returns a single string with linefeeds inserted

Usage

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