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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/lgtdl.R

Description

The covariate component of the lgtdl object is returned.

Usage

1
2
3
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

1
2
3
4
5
6
7
  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)

lgtdl documentation built on May 1, 2019, 8:47 p.m.

Related to getcov in lgtdl...