R: Wrap text to a specified width, adding newlines for spaces if...

wrap_format {scales} | R Documentation

## Wrap text to a specified width, adding newlines for spaces if text exceeds the width

### Description

Wrap text to a specified width, adding newlines for spaces if text exceeds the width

### Usage

    wrap_format(width)

### Arguments

`width` | value above which to wrap

### Value

Function with single parameter x, a character vector, that returns a wrapped character vector

### Examples

    wrap_10 <- wrap_format(10)
    wrap_10('A long line that needs to be wrapped')

[Package scales version 0.4.1 Index]