Learn R Programming

formatters (version 0.5.11)

nlines: Number of lines required to print a value

Description

Number of lines required to print a value

Usage

nlines(x, colwidths = NULL, max_width = NULL, fontspec, col_gap = NULL)

# S4 method for list nlines(x, colwidths = NULL, max_width = NULL, fontspec, col_gap = NULL)

# S4 method for NULL nlines(x, colwidths = NULL, max_width = NULL, fontspec, col_gap = NULL)

# S4 method for character nlines(x, colwidths = NULL, max_width = NULL, fontspec, col_gap = NULL)

Value

The number of lines needed to render the object x.

Arguments

x

(ANY)
the object to be printed.

colwidths

(numeric)
column widths (if necessary). Principally used in rtables' method.

max_width

(numeric(1))
width that strings should be wrapped to when determining how many lines they require.

fontspec

(font_spec)
a font_spec object specifying the font information to use for calculating string widths and heights, as returned by font_spec().

col_gap

(numeric(1))
width of gap between columns in number of spaces. Only used by methods which must calculate span widths after wrapping.