lgtdl (version 1.1.4)

getcov: A function to extract the covariate from an object of class lgtdl.

Description

The covariate component of the lgtdl object is returned.

Usage

getcov(x, ...) "getcov"(x, cov, ...)

Arguments

x
The lgtdl object.
cov
The name of the covariate to be extracted.
...
Ignored, there for potential future use.

Value

The covariate, as either a matrix or vector, is returned.

See Also

lgtdl, as.lgtdl

Examples

Run this code
  x1<-data.frame(time=c(1,3,5), cov=c(4,6,8))
  x2<-data.frame(time=c(11,13,15), interest=c(66,45,88))

  x1<-as.lgtdl(x1)
  x2<-as.lgtdl(x2)
  getcov(x1)
  getcov(x2)

Run the code above in your browser using DataCamp Workspace