This function prints a formatted message with a timestamp, surrounded by separators for better readability in console outputs or logs.
Usage
InfoChunk(
Message = "",
Date = TRUE,
Extra1 = 0L,
Extra2 = 1L,
Bold = FALSE,
Red = FALSE,
Time = FALSE,
Level = 0L,
NLines = 1L,
...
)
Arguments
- Message
A character string representing the main message to be timestamped. This parameter is mandatory and cannot be
NULL
or empty.- Date
logical; whether to include the date in the timestamp. Default is
FALSE
, meaning only the time is printed. See CatTime.- Extra1, Extra2
integer; the number of extra empty lines to print before and after the separator lines. See CatSep for more details.
- Bold
logical; whether to print the text in bold. Default is
FALSE
.- Red
logical; whether to print the text in red. Default is
FALSE
.- Time
logical; whether to include the time in the timestamp. Default is
FALSE
.- Level
integer; the level at which the message will be printed. If e.g. Level = 1, the following string will be printed at the beginning of the message: " >>> ". Default is
0
.- NLines
integer; the number of newline characters to print after the message. Default is 1.
- ...
Additional arguments passed to CatSep for customizing the separators.
Examples
InfoChunk(Message = "Started")
#>
#> --------------------------------------------------
#> Started
#> --------------------------------------------------
#>
InfoChunk(Message = "finished", Char = "*", CharReps = 60)
#>
#> ************************************************************
#> finished
#> ************************************************************
#>