Output section numbers to the console via a call to message. Useful for tracking progress when running a script and for debugging where errors occur.

section(x, run = TRUE, spacing = ".", end = ")")

Arguments

x

A character string, such as '1)' or '2.3)' or of a similar form.

run

Logical; if TRUE, a message is generated.

spacing

A character string, the character to use to determine the number of indents to use to identify section hierarchies.

end

A character string, the final symbol to attach to the end of a section header.

Examples


section("1")
#> 1)
# Periods indent output by 2 spaces
section("1.1")
#>   1.1)
section("1.1.1")
#>     1.1.1)