Last data update: 2014.03.03

R: 'Heading' pseudo-function
HeadingR Documentation

Heading pseudo-function

Description

The Heading pseudo-function normally overrides the automatic heading on the following items in a table. Setting override=FALSE is used in automatically generated expressions.

Usage

Heading(name = NULL, override = TRUE)

Arguments

name

A legal R variable name, or a character constant.

override

Whether this heading should override one that is already present.

Details

This replaces the automatic heading or row label on the following item with the name or string as specified. If no argument is given, the heading or label is suppressed.

An alternative form of Heading(name) is (name=...), where ... is an expression to be displayed in the table.

If override = FALSE, the label is only supplied if there is no other label. This is used in the code for Factor.

Pseudo-functions

This is a “pseudo-function”: it takes the form of a function call, but is never actually called: it is handled specially by tabular.

Examples

tabular( (Sepal.Length+Sepal.Width) ~ 
         (Heading(Mean)*mean + (S.D.=sd)), data=iris )

Results