getcov {lgtdl}R Documentation

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, ...)
## S3 method for class 'lgtdl'
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.

Author(s)

Robert Gentleman

See Also

lgtdl, as.lgtdl

Examples

  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)

[Package lgtdl version 1.1.5 Index]