Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

wrap

Wrap cell content over multiple lines


Description

Text wrapping only really makes sense when the table width() has been set.

Usage

wrap(ht)
wrap(ht) <- value
set_wrap(ht, row, col, value )
map_wrap(ht, row, col, fn)

Arguments

ht

A huxtable.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

fn

A mapping function. See mapping-functions for details.

value

A logical vector or matrix.

Set to NA to reset to the default, which is TRUE.

Value

wrap() returns the wrap property. set_wrap() returns the modified huxtable.

Examples

long_text <- paste(
        rep("Some long text.", 10),
        collapse = " "
     )
ht <- huxtable(Long = long_text)
width(ht) <- 0.2
wrap(ht) <- TRUE

## Not run: 
  quick_html(ht)

## End(Not run)

huxtable

Easily Create and Style Tables for LaTeX, HTML and Other Formats

v5.3.0
MIT + file LICENSE
Authors
David Hugh-Jones [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.