1
0
Fork 0
mirror of https://github.com/prise6/aVirtualTwins.git synced 2024-05-01 19:52:43 +02:00

New initial wrapper

This commit is contained in:
prise6 2015-06-21 02:31:29 +02:00
parent cc4cfaf720
commit db7154abef

21
R/object.wrapper.R Normal file
View file

@ -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, ...)
}