File: string.break.line.Rd

package info (click to toggle)
hmisc 4.2-0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,332 kB
  • sloc: asm: 27,116; fortran: 606; ansic: 411; xml: 160; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
\name{string.break.line}
\alias{string.break.line}
\title{Break a String into Many Lines at Newlines}
\description{
  Takes a string and breaks it into seperate substrings where there are
  newline characters.
}
\usage{
string.break.line(string)
}
\arguments{
  \item{string}{character vector to be separated into many lines.}
}
\value{
  Returns a list that is the same length of as the \code{string}
  argument.

  Each list element is a character vector.

  Each character vectors elements are the
  split lines of the corresponding element in the \code{string} argument vector.
}
\author{Charles Dupont}
\seealso{\code{\link{strsplit}}}
\examples{
a <- c('', 'this is a single line string',
       'This is a\nmulti-line string.')

b <- string.break.line(a)
}
\keyword{print}
\keyword{character}