[R] summary.formula()

Hua Liang dickliang911 at gmail.com
Wed Mar 4 15:45:34 CET 2015


I try to use t.test  instead of Wilcox.test in summary.formula() , a very decent function developed by Frank, as follows. But I got error messages. Can someone help me out?
 
Dick
 
 
uT<-function(a,b){
        j<-t.test(a)
        p<-list(P=j$p.value,stat=j$statistic,
            df=j$parameter,testname=j$method,statname="")
        return(p)
        }
 
pbcset<- na.omit(pbc[,c("trt","chol","copper","platelet")])
 
sf2 <- summary(trt~chol+platelet,data=pbc,test=T,method="reverse",conTest=uT)
print(sf2, prtest = "P")


More information about the R-help mailing list