Skip to contents

This function prints customizable separator lines to the console, optionally preceded and followed by empty lines. It is useful for improving the readability of console output in R scripts or during interactive sessions.

Usage

CatSep(
  Rep = 1L,
  Extra1 = 0L,
  Extra2 = 1L,
  Char = "-",
  CharReps = 50L,
  Bold = FALSE,
  Red = FALSE,
  ...
)

Arguments

Rep

integer; the number of separator lines to print. Default is 1.

Extra1, Extra2

integer; the number of extra empty lines to print before and after the separator lines. Default is 0 and 1, respectively.

Char

character; the character used to construct the separator line. Default is "-".

CharReps

integer; the number of times the character is repeated to form a separator line. Default is 50.

Bold

logical; whether to print the text in bold. Default is FALSE.

Red

logical; whether to print the text in red. Default is FALSE.

...

additional arguments to be passed to cat().

Value

The function is called for its side effect (printing to the console) and does not return a meaningful value.

Author

Ahmed El-Gabbas

Examples

CatSep()
#> --------------------------------------------------

CatSep(2)
#> --------------------------------------------------

CatSep(2,2,3)
#> 
#> 
#> --------------------------------------------------
#> 
#> 

CatSep(2,2,3, Char = "*")
#> 
#> 
#> **************************************************
#> 
#> 

CatSep(2,2,3, Char = "*", CharReps = 20)
#> 
#> 
#> ********************
#> 
#>