mytable {moonBook} | R Documentation |
Produce table for descriptive statistics
Description
Produce table for descriptive statistics by groups for several variables easily. Depending on the nature of these variables, different descriptive statistical methods were used(t-test, ANOVA,Kruskal-Wallis, chisq, Fisher,...)
Usage
mytable(x, ...)
## S3 method for class 'formula'
mytable(x, ...)
## S3 method for class 'data.frame'
mytable(x, ...)
Arguments
x |
An R object, formula or data.frame |
... |
arguments to be passed to |
Methods (by class)
-
formula
: S3 method for formula -
data.frame
: S3 method for data.frame
Examples
mytable(acs)
mytable(~age+sex,data=acs)
mytable(Dx~age+sex+height+weight+TC+TG+HDLC,data=acs,method=3,digits=2)
mytable(am+cyl~.,data=mtcars)
out=mytable(sex~.,data=acs)
out
summary(out)
## Not run:
require(ztable)
ztable(out)
## End(Not run)
mytable(acs)
[Package moonBook version 0.3.1 Index]