Learn R Programming

Epi (version 2.56)

timeScales: The time scales of a Lexis object

Description

Functions to get the names and type of the time scales of a Lexis object.

Usage

timeScales(x)
timeSince(x)
tsNA20( x, all.scales=FALSE )

Value

timeScales returns a character vector containing the names of the variables in x that represent the time scales. Extracted from the time.scales attribute of the object.

timeSince returns a named character vector, the names being the names of the timescales and the content being the names of the states to which the corresponding timescale is defined as time since entry. For those time scales that are not defined as such an empty string is used. Hence, if none of the timescales are defined as time since entry to a state timeSince will return a vector of empty strings.

Arguments

x

an object of class Lexis.

all.scales

Should NAs in all timescales be replaced by 0? If FALSE (the default) only timescales defined as time since entry to a state get NAs replaced by 0s

Author

Martyn Plummer, Bendix Carstensen

See Also

Lexis, splitLexis