help for jformat (Roger Newson)

Justify formats for a list of variables

jformat [ varlist ] [ , justify(justification) ]

where justification is one of

left | right | centre

Description

jformat changes the display formats of a list of variables
to be left-justified, right-justified or centre-justified.
Other features of the formats (such as the format width) are preserved.

Options

justify(justification) specifies whether the formats of the varlist
will be changed to be left-justified, right-justified or centre-justified.
If the justify() option is absent,
then jformat assumes justify(left),
and the formats are changeed to be left-justified.

Remarks

At the time of writing, Stata only allows centre-justified formats for string variables.
And, even then, they are ignored and treated as right-justified by most Stata commands,
with the exception of the display command.
However, the option justify(centre) was added in case Stata policy changes,
or in case users write packages which do not ignore centre-justified formats.

Examples

Set-up:

. sysuse auto, clear

. describe, full

. list in 1/20, abbr(32)

Left-justify formats for all variables:

. jformat

. describe, full

. list in 1/20, abbr(32)

Right-justify format for the variable make:

. jformat make, j(r)

. describe make, full

. list make in 1/20, abbr(32)

Right-justify format for the variables price and trunk:

. jformat price trunk, j(r)

. describe price trunk, full

. list price trunk in 1/20, abbr(32)

Author

Roger Newson, Imperial College London, UK.
Email: r.newson@imperial.ac.uk

Also see

Manual: [D] formar, [D] describe

On-line: help for format, describe