Define and obtain the descr or tit attribute

Share:

Description

The attributes descr and tit describe an object, typically a data frame or a model. tit should be a short description (title), descr should contain all documentation useful to identify the origin and the changes made to the object.
The descr and tit functions set them and extract these attributes.

Usage

1
2
3
4
descr(x)
tit(x) 
descr(x) <- value
tit(x) <- value

Arguments

x

object to which the descr or tit attribute should be attached or from which it is obtained

value

character vector (descr) or string (tit) to be stored

Details

Plotting and printing functions may search for the tit attribute or even for the descr attribute, depending on c.env$docout.

descr(x) <- text will append the existing descr(x) text to the new one unless the first element of text equals "^", whereas tit(x) <- string replaces tit(x).

Value

descr and tit return the respective attributes of object x

Author(s)

Werner A. Stahel, ETH Zurich

Examples

1
2
3
4
5
data(asphalt)
tit(asphalt)
descr(asphalt)
descr(asphalt) <- "I will use this dataset in class soon."
descr(asphalt)