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 = ""))
trt+resp~time|patnum
,
interpreted as "plot treatment and response vs time, by patnum"from
and
to
, giving the minimum and maximum durations of follow-up
for patients to be plotted. This is necessary to prevent the
dwarfing of treatment courses for patients with short follow-up
when plotted alongside those of patients with extended follow-uptxs
txs
txs
resp
resp
c(ncols, nrows)
help
## TODO: Provide an example
## TODO: Document usage. If necessary, include sample data sets in package:VizOR.
Run the code above in your browser using DataLab