Description Usage Arguments Note Author(s) References See Also Examples
This individual-level graphic depicts horizontal time intervals of an ongoing treatment course, color-coded by, e.g., agent. Categorical events which may occur during treatment, such as assessments of response, are annotatated with color-coded arrows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | timeline(figlabel, txs, resp, bsl, ptid = "patnum", condition = TRUE,
formula = trt + resp ~ time | patnum, followed = list(from =
as.difftime(0, units = "days"), to = as.difftime(Inf, units = "days")),
tx.start = "start", tx.end = "end",
treatment = as.character(formula[[2]][[2]]),
response = as.character(formula[[2]][[3]]),
time = as.character(formula[[3]][[2]]), timeunit = units(resp[[time]]),
caption = NULL, tx.key = key(txs[[treatment]]),
resp.key = key(resp[[response]]), cols.rows = c(2, 5),
prefix.string = "splot", xlim = c(0, as.double(min(followed$to,
max(resp[[time]])), units = timeunit)), xlab = paste("Time (", timeunit,
")", sep = ""), ylab = "", filename = paste(figlabel, "followed",
sub("[.]", "_", followed$from), "-", sub("[.]", "_", followed$to), "y", sep =
""))
|
figlabel |
A string to be used as a LaTeX figure label |
txs |
A data frame describing intervals of treatment |
resp |
A data frame describing treatment response assessments |
bsl |
A data frame of subject baseline characteristics |
ptid |
The name of the unique patient identifier (default is "patnum") |
condition |
An R expression giving a logical condition (a predicate on subject baseline characteristics) used for selecting the subjects to be plotted |
formula |
A formula of the form |
followed |
A list with difftime components |
tx.start |
name of treatment start date column of |
tx.end |
name of treatment end date column of |
treatment |
name of treatment column of |
response |
name of response column of |
time |
name of time column of |
timeunit |
The time unit desired for the horizontal axis |
caption |
The figure caption may be provided explicitly or (if NULL) constructed automatically |
tx.key |
The plot legend for treatments |
resp.key |
The plot legend for responses |
cols.rows |
Trellis layout as |
prefix.string |
Prefix string (including possibly a directory) for cached plot output |
xlim |
x-axis limits |
xlab |
x-axis label |
ylab |
y-axis label |
filename |
Filename pattern for cached plot output |
TODO: further notes
David C. Norris
TODO: Reference our white paper or pending publication
TODO: List objects to See Also as help
1 2 | ## TODO: Provide an example
## TODO: Document usage. If necessary, include sample data sets in package:VizOR.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.