string.break.line {Hmisc}R Documentation

Break a string into many lines at carage retruns.

Description

Takes a string and breaks it into seperate substrings where there are carrage returns.

Usage

string.break.line(string)

Arguments

string character vector to be separated into many lines.

Value

Returns a list that is the same length of as the string argument.
Each list element is a character vector.
Each character vectors elements are the split lines of the corasponding element in the string argument vector.

Author(s)

Charles Dupont

See Also

strsplit

Examples

a <- c('', 'this is a single line string',
       'This is a\nmulti-line string.')

b <- string.break.line(a)

[Package Hmisc version 3.3-1 Index]