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

splitLine

Split line with line breaks depending on max.width


Description

This is a helper function to insert line breaks depending on (split.cells parameter of pandoc.table) of the returning table.

Usage

splitLine(x, max.width = panderOptions("table.split.cells"),
  use.hyphening = FALSE)

Arguments

x

string to be split. Works only with one string. Non-string arguments and multi-dimensional arguments are returned unchaged

max.width

default integer value specyfing max number of characters between line breaks

use.hyphening

(default: FALSE) if try to use hyphening when splitting large cells according to table.split.cells. Requires sylly.

Value

character string with line breaks

Examples

splitLine('foo bar', 6)
splitLine('foo bar', 7)
splitLine('Pandoc Package', 3, TRUE)

pander

An R 'Pandoc' Writer

v0.6.3
AGPL-3 | file LICENSE
Authors
Gergely Daróczi [aut, cre] (<https://orcid.org/0000-0003-3149-8537>), Roman Tsegelskyi [aut]
Initial release
2018-11-06

We don't support your browser anymore

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