[R] summary.formula()
Tom Wright
tom at maladmin.com
Wed Mar 18 20:54:10 CET 2015
First you need to make the data pbc available, perhaps by:
data(pbc, package="survival")
Then the line:
sf2<-summary(...
looks wrong, usually you would use the summary() function to look at the
output from a function, seems to me you are missing the function here. I
have no idea what this function could be.
On Wed, 2015-03-04 at 09:45 -0500, Hua Liang wrote:
> 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