Wraps text in a character matrix so, that it's displayed over more than one line.

ColumnWrap(x, width = NULL)

Arguments

x

the matrix with one row

width

integer, the width of the columns in characters

Value

a character matrix

Details

A data.frame containing character columns with long texts is often wrapped by columns. This can lead to a loss of overview. ColumnWrap() wraps the lines within the columns.

See also

Author

Andri Signorell andri@signorell.net

Examples


Abstract(d.pizza)
#> ────────────────────────────────────────────────────────────────────────────── 
#> d.pizza
#> 
#> data frame:	1209 obs. of  16 variables
#> 		917 complete cases (75.8%)
#> 
#>   Nr  Class  ColName         NAs          Levels                           
#>   1   int    index             .                                           
#>   2   dat    date             32 (2.6%)                                    
#>   3   num    week             32 (2.6%)                                    
#>   4   num    weekday          32 (2.6%)                                    
#>   5   fac    area             10 (0.8%)   (3): 1-Brent, 2-Camden,          
#>                                           3-Westminster                    
#>   6   int    count            12 (1.0%)                                    
#>   7   log    rabate           12 (1.0%)                                    
#>   8   num    price            12 (1.0%)                                    
#>   9   fac    operator          8 (0.7%)   (3): 1-Allanah, 2-Maria, 3-Rhonda
#>   10  fac    driver            5 (0.4%)   (7): 1-Butcher, 2-Carpenter,     
#>                                           3-Carter, 4-Farmer, 5-Hunter, ...
#>   11  num    delivery_min      .                                           
#>   12  num    temperature      39 (3.2%)                                    
#>   13  int    wine_ordered     12 (1.0%)                                    
#>   14  int    wine_delivered   12 (1.0%)                                    
#>   15  log    wrongpizza        4 (0.3%)                                    
#>   16  ord    quality         201 (16.6%)  (3): 1-low, 2-medium, 3-high     
#>