form3justify: formats a character string

Description Usage Arguments Details Value Future See Also Examples

View source: R/rbsa1.code.r

Description

Formats character string(s). The main use of this function is to produce aligned columns lists while not printing them at the same time.

Usage

1
2
3
4
5
6
7
 
  form3justify(chaine,
               nbc=8,
               format=3,
               tronc=TRUE,
               carac="",
               monitor=rbsa0$monitor$v) 

Arguments

chaine

the character string to be printed, can be a vector.

nbc

Desired number of characters for the result; when chain is a vector can be a vector of the same length

format

Indicates the type of alignment:
0 no aligment (no supplementary character added to reach nbc)
1 to the left side
2 centered
3 to the right side

tronc

If true, no more than nbc characters are returned and possibly the string is truncated. In that case, $ is introduced to indicate the fact.

carac

Character to use for enlarging the string

monitor

List of constants indicating the monitoring choices, see the rbsa0$monitor$v provided object as an example.

Details

The justification is made component by component, no concatenation between them is done.

Value

a character string

Future

Improve the behavior when nchar(carac)>1.

See Also

text3preparation

Examples

1
2
3
4
 
  form3justify("vers") 
  form3justify("versification",5) 
  form3justify(letters[1:5],format=2,carac="+"); 

rbsa documentation built on May 31, 2017, 4:29 a.m.