Print a header, plus some optional parameters.

A header is thought to be the first message of a complex function, or of a runtime load for a package etc. Compare to pioTit, the header does not have the surrounding symbols and imposes less separations on the output layout.

The function allows also to pass some named vector as extra parameters, which will be layed out using function pioStr.

pioHdr(..., toPrint = NULL, prefix = "")

Arguments

...

A list of parameters that will be concatenated to create the header.

toPrint

A named vector of arguments, that will be print in the format `n=v` where `n` is a name and `v` a value using function pioStr.

prefix

A prefix for each one of the strings in `toPrint`, passed to pioStr.

Value

None

Examples

# A simple header pioHdr("My new cool tool")
#> [ My new cool tool ] #>
# A header with also some parameters, if the parameters # are not part of a named vector, automatic names are generated x = 12345 y = TRUE z = NA pioHdr("My new cool function", toPrint = c(x, y, z))
#> [ My new cool function ] #> Arg. #1 12345 #> Arg. #2 1 #> Arg. #3 NA #>
# If names are available, they are used params = c(x, y, z) names(params) = c("Input = ", "Test = ", "Plot = ") pioHdr("My new cool function", toPrint = params)
#> [ My new cool function ] #> Input = 12345 #> Test = 1 #> Plot = NA #>
# Using extra formats pioHdr("My new cool function", toPrint = params, prefix = '\t- ')
#> [ My new cool function ] #> - Input = 12345 #> - Test = 1 #> - Plot = NA #>
# Change colours -- blak text on orange background colorscheme_orange_black() pioHdr("My new cool function", toPrint = params)
#> [ My new cool function ] #> Input = 12345 #> Test = 1 #> Plot = NA #>