
Last chance! 50% off unlimited learning
Sale ends in
The attributes doc
and tit
describe an object, typically
a data frame or a model. tit
should be a short description (title),
doc
should contain all documentation useful to identify
the origin and the changes made to the object.
The doc
and tit
functions set them and extract these
attributes.
doc(x)
tit(x)
doc(x) <- value
tit(x) <- value
doc
and tit
return the respective attributes of object
x
object to which the doc
or tit
attribute
should be attached
or from which it is obtained
character vector (doc
) or string (tit
)
to be stored
Werner A. Stahel, ETH Zurich
Plotting and printing functions may search for the tit
attribute or even for the doc
attribute, depending on
c.env$docout
.
doc(x) <- text
will append the existing doc(x)
text to
the new text
unless its first element equals (the first element
of) text
.
(This avoids piling up the same line by unintended multiple call to
doc(x) <- value
with the same value
.)
If the first element of text
equals "^"
,
the first element of doc(x)
is dropped.
tit(x) <- string
replaces tit(x)
with string
.
data(d.blast)
doc(d.blast)
doc(d.blast) <- "I will use this dataset in class soon."
doc(d.blast)
Run the code above in your browser using DataLab