timeScales {Epi}R Documentation

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 )

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

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.

Author(s)

Martyn Plummer, Bendix Carstensen

See Also

Lexis, splitLexis


[Package Epi version 2.53 Index]