From 82c56a4688f05f43845b4fc3ed41bac91edbca73 Mon Sep 17 00:00:00 2001 From: prise6 Date: Wed, 10 Jun 2015 14:38:36 +0200 Subject: [PATCH] Nothing important --- R/tools.R | 9 ++++++--- R/tree.R | 1 + R/tree.class.R | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/R/tools.R b/R/tools.R index 19e76e0..76c3453 100644 --- a/R/tools.R +++ b/R/tools.R @@ -8,7 +8,7 @@ vt.getQAOriginal <- function(response, trt, ahat){ sum(response*ahat*(1-trt))/sum(ahat*(1-trt)) - (sum(response*trt)/sum(trt) - sum(response*(1-trt))/sum(1-trt)) - } + } return(tmp) } @@ -32,7 +32,6 @@ vt.getIncidence <- function(df){ return(table.res) } - vt.rr.snd <- function(vt.difft, selected){ if(sum(selected) == 0){ return(0) @@ -40,4 +39,8 @@ vt.rr.snd <- function(vt.difft, selected){ return((sum(vt.difft$twin1*selected*vt.difft$vt.object$data[, 2])/sum(selected*vt.difft$vt.object$data[, 2])) /(sum(vt.difft$twin1*selected*(1-vt.difft$vt.object$data[, 2]))/sum(selected*(1-vt.difft$vt.object$data[, 2])))) } -} \ No newline at end of file +} + + + + diff --git a/R/tree.R b/R/tree.R index 0d2ce99..58ae35d 100644 --- a/R/tree.R +++ b/R/tree.R @@ -12,6 +12,7 @@ #' @field tree rpart Rpart object to construct the tree #' @field Ahat vector Indicator of beglonging to Ahat #' +#' @import methods VT.tree <- setRefClass( Class = "VT.tree", diff --git a/R/tree.class.R b/R/tree.class.R index cc11b72..0700a7c 100644 --- a/R/tree.class.R +++ b/R/tree.class.R @@ -3,6 +3,8 @@ #' A reference class to compute subgroups by classifiation tree #' #' @include tree.R +#' +#' @import methods VT.tree.class <- setRefClass( Class = "VT.tree.class",