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

strbreak

Break Character Strings to Fit Width


Description

Inserts line breaks (collapse) into input character strings. The main intention of this function is to prepare long strings for printing, so the output is not wider than width.

Usage

strbreak(x, width=getOption("width"), exdent=2, collapse="\n")

Arguments

x

a character vector

width

a positive integer giving the width of the output.

exdent

a positive integer specifying the indentation of subsequent lines after the first line.

collapse

a character. This is inserted to break lines.

Author(s)

See Also

Examples

longString = paste(rep(LETTERS, 10), collapse="", sep="")
cat(strbreak(longString))

Biobase

Biobase: Base functions for Bioconductor

v2.50.0
Artistic-2.0
Authors
R. Gentleman, V. Carey, M. Morgan, S. Falcon
Initial release

We don't support your browser anymore

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