Trying to fix combined function without much luck

This commit is contained in:
agdamsbo 2018-10-03 09:53:51 +02:00
parent f32da76505
commit 5e1ae0b4af
2 changed files with 70 additions and 65 deletions

View File

@ -14,18 +14,23 @@
rep_biv<-function(y,v1,string,data,method="pval",logistic=FALSE,ci=FALSE,cut=0.1,v2=NULL,v3=NULL){ rep_biv<-function(y,v1,string,data,method="pval",logistic=FALSE,ci=FALSE,cut=0.1,v2=NULL,v3=NULL){
require(rep_lm) a<-y
require(rep_glm) b<-v1
require(cie_test) s<-string
dat<-data
me<-method
log<-logistic
CI<-ci
ct<-cut
if (method=="pval"&logistic==FALSE){ if (me=="pval"&log==FALSE){
rep_lm(y=y,v1=v1,string=string,data=data,ci=ci) daDoctoR::rep_lm(y=a,v1=b,string=s,data=dat,ci=CI)
} }
if (method=="pval"&logistic==TRUE){ if (me=="pval"&log==TRUE){
rep_lm(y=y,v1=v1,string=string,data=data,ci=ci) daDoctoR::rep_lm(y=a,v1=b,string=s,data=dat,ci=CI)
} }
if (method=="cie"){ if (method=="cie"){
cie_test(y=y,v1=v1,string=string,data=data,logistic=logistic,cut=cut,v2=v2,v3=v3) daDoctoR::cie_test(y=a,v1=b,string=s,data=dat,logistic=log,cut=ct)
} }
return(df) return(df)
} }