Learn R Programming

NCmisc (version 1.2.0)

Header: Print heading text with a border.

Description

Makes highly visible headings, can separately horizontal, vertical and corner characters

Usage

Header(txt, h = "=", v = h, corner = h, align = "center")

Value

returns nothing, simply prints the heading to the console

Arguments

txt

The text to display in the centre

h

the ascii character to use on the horizontal sections of the border, and used for v,corner too if not specified separately

v

the character to use on vertical sections of the border

corner

the character to use on corner sections of the border

align

alignment of the writing, when there are multiple lines, e.g, "right", "left", "centre"/"center"

Author

Nicholas Cooper njcooper@gmx.co.uk

Examples

Run this code
Header("Section 1")
Header("Section 1",h="-",v="|",corner="*")
Header(c("SPACE","The final frontier"))
Header(c("MY SCRIPT","Part 1"),align="left",h=".")

Run the code above in your browser using DataLab