strWrap: Wrap Character Strings to Format Paragraphs

Description Usage Arguments Value See Also Examples

Description

A wrapper for as.character that writes to the Mac/Windows clipboard.

Usage

1
  strWrap(text = "clipboard", width = 70, copy2clip = TRUE)

Arguments

text

character vector, or an object which can be converted to a character vector by as.character.

width

A positive integer giving the target column for wrapping lines in the output.

copy2clip

logical. If TRUE attempts to copy the output to the clipboard.

Value

Prints a wrapped text vector to the console and copies the wrapped text to the clipboard on a Mac or Windows machine.

See Also

strwrap

Examples

1
2
3
4
x <- paste2(DATA$state, sep = " " )
strWrap(x)
strWrap(x, 10)
#should be copied to the clipboard on a Mac or Windows machine.

trinker/qdap2 documentation built on May 31, 2019, 9:47 p.m.