Learn R Programming

thisutils (version 0.0.7)

str_wrap: Wrap text

Description

Wrap text

Usage

str_wrap(x, width = 80)

Value

A character vector with wrapped text.

Arguments

x

A character vector to wrap.

width

The maximum width of the lines.

Examples

Run this code
str_wrap(rep("Hello, world!", 10))
str_wrap(rep("Hello, world!", 10), width = 10)

Run the code above in your browser using DataLab