Learn R Programming

teal.reporter (version 0.4.0)

split_text_block: Divide text block into smaller blocks

Description

Split a text block into smaller blocks with a specified number of lines.

Usage

split_text_block(x, n)

Value

List of character strings with up to n lines in each element.

Arguments

x

(character) string containing the input block of text

n

(integer) number of lines per block

Details

A single character string containing a text block of multiple lines (separated by \n) is split into multiple strings with n or less lines each.