| time.band {Epi} | R Documentation |
The break points of a Lexis object (created by a call to
splitLexis) divide the follow-up intervals into time bands
along a given time scale. The breaks function returns
the break points, for a given time scale, and the timeBand
classifies each row (=follow-up interval) into one of the time bands.
timeBand(lex, time.scale, type) breaks(lex, time.scale)
lex |
an object of class Lexis |
time.scale |
a character or integer vector of length 1 identifying the time scale of interest |
type |
a string that determines how the time bands are labelled. See Details below |
Time bands may be labelled in various ways according to the
type argument. The permitted values of the type
argument, and the corresponding return values are:
The breaks function returns a vector of break points
for the Lexis object, or NULL if no break points have been
defined by a call to splitLexis. The timeBand
function returns a numeric vector or factor, depending on the value
of the type argument.
A newly created Lexis object has no break points defined.
In this case, breaks will return NULL, and
timeBand will return a degenerate factor with one level
labelled "(-Inf,Inf]".
Martyn Plummer