nlines: Number of lines required to print a value

nlinesR Documentation

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 signature 'list'
nlines(x, colwidths = NULL, max_width = NULL, fontspec, col_gap = NULL)

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

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

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.

Value

The number of lines needed to render the object x.


formatters documentation built on June 22, 2024, 9:42 a.m.