From db7154abeffe59ac474c976b27037002c42b7345 Mon Sep 17 00:00:00 2001 From: prise6 Date: Sun, 21 Jun 2015 02:31:29 +0200 Subject: [PATCH] New initial wrapper --- R/object.wrapper.R | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 R/object.wrapper.R diff --git a/R/object.wrapper.R b/R/object.wrapper.R new file mode 100644 index 0000000..1acc6af --- /dev/null +++ b/R/object.wrapper.R @@ -0,0 +1,21 @@ +#' +#' Initialize virtual twins data +#' +#' \code{vt.data} is a wrapper of \code{\link{formatRCTDataset}} and +#' \code{\link{VT.object}}. +#' +#' @param dataset data.frame representing RCT's +#' @param outcome.field name of the outcome's field in \code{dataset} +#' @param treatment.field name of the treatment's field in \code{dataset} +#' @param interactions logical. If running VirtualTwins with treatment's +#' interactions, set to TRUE (default value) +#' @param ... parameters of \code{\link{VT.object}} +#' +#' @return \code{VT.object} +#' +#' @export + +vt.data <- function(dataset, outcome.field, treatment.field, interactions = TRUE, ...){ + data <- formatRCTDataset(dataset, outcome.field, treatment.field, interactions = TRUE) + VT.object(data = data, ...) +} \ No newline at end of file