putLineBreaks: function for wraping text by definite length

Description Usage Arguments Details Value Author(s) Examples

Description

This function wraps a text in lines with definite length.

Usage

1
putLineBreaks(object,show.output=FALSE,width.output)

Arguments

object

character string, text to be wraped

show.output

logical, if TRUE the text will be wraped in lines with definite length

width.output

numeric, single positive integer defining the length of a line

Details

The argument object denotes the text to be displayed.
If show.output=TRUE the text will be displayed in lines with a definite length, otherweise blank.
The argument width.output denotes the to be defined length of a line

Value

Returns the wraped text in lines with user-defined length if show.output=TRUE. Otherwise no text will be returned.

Author(s)

Matthias Greiner matthias.greiner@bfr.bund.de(BfR),
Katharina Schueller schueller@stat-up.de(STAT-UP Statistical Consulting),
Natalia Belgorodski belgorodski@stat-up.de(STAT-UP statistical Consulting)

Examples

1
2
3
4
5
6
object<-"This is a lang text to be wraped. This is a lang text 
 to be wraped. This is a lang text to be wraped. This is a lang text to be 
 wraped. This is a lang text to be wraped. This is a lang text to be wraped. 
 This is a lang text to be wraped. This is a lang text to be wraped."
object<-gsub(x=object,"\n",replacement="")
putLineBreaks(object=object,show.output=TRUE)       

BfRstats/rrisk documentation built on May 5, 2019, 3:49 p.m.