File: string.break.line.s

package info (click to toggle)
hmisc 5.2-4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,044 kB
  • sloc: asm: 28,905; f90: 590; ansic: 415; xml: 160; fortran: 75; makefile: 2
file content (9 lines) | stat: -rw-r--r-- 241 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
if(!exists("string.break.line", mode='function')) {
  string.break.line <- function(string) {
    if(! is.character(string)) {
      x <- as.character(string)
    }
    
    ifelse(string == '', '', strsplit(string, '\n', fixed=TRUE))
  }
}