Browse Source

Removing reference to total in add.Ref

Andrej 1 week ago
parent
commit
b533191b8b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      R/hypoAfrica.R

+ 1 - 1
R/hypoAfrica.R

@@ -94,7 +94,7 @@ add.p.values.fisher<-function(df,dfRef,var,timeVar='visitid',nVar='total'){
    pRef<-df[,base::sprintf('%s_ref',var)]
    nRef<-df[,'nRef']
    v<-df[,var]
-   n<-df[,'total']
+   n<-df[,nVar]
    p<-base::rep(0, base::nrow(df))
    for (i in 1:base::nrow(df)){
    	  dat <- base::data.frame(tox = base::c(pRef[i]*nRef[i],v[i]*n[i]),