plot.recdata: Plot the recurrent event data

Description Usage Arguments Examples

View source: R/plot.recdata.R

Description

Plot the recurrent events and regular visits for several subjects for illustration.

Usage

1
2
3
## S3 method for class 'recdata'
plot(recdata, time, ids = NULL, n.id = 5, main = NULL,
  xlab = "time", ylab = "id")

Arguments

recdata

a rectime data object generated from recdata().

time

the column name for the time variable.

ids

the vector of subject id that the user wants to plot. The default is NULL. If ids=NULL, the first n.id subjects will be plotted.

n.id

the number of subjects that the user wants to plot. The default is 5.

main

the title of the plot. The default is NULL.

xlab

the label of the x axis. The default is "time".

ylab

the label of the y axis. The default is "id".

Examples

1
2
3
data(simdata)
recd <- recdata(id="id", type="type", time="time", data=simdata)
plot.recdata(recd, time="time", n.id=5, xlab="time", ylab="id")

TianmengL/rectime documentation built on June 5, 2021, 8:29 p.m.