summary.univariateTable {Publish} | R Documentation |
Preparing univariate tables for publication
Description
Summary function for univariate table
Usage
## S3 method for class 'univariateTable'
summary(
object,
n = "inNames",
drop.reference = FALSE,
pvalue.stars = FALSE,
pvalue.digits = 4,
show.missing = c("ifany", "always", "never"),
show.pvalues,
show.totals,
...
)
Arguments
object |
|
n |
If not missing, show the number of subjects in each
column. If equal to |
drop.reference |
Logical or character (vector). Decide if line with reference
level should be suppressed for factors. If |
pvalue.stars |
If TRUE use |
pvalue.digits |
Passed to |
show.missing |
Decides if number of missing values are shown in table.
Defaults to |
show.pvalues |
Logical. If set to |
show.totals |
Logical. If set to |
... |
passed on to |
Details
Collects results of univariate table in a matrix.
Value
Summary table
Author(s)
Thomas A. Gerds <tag@biostat.ku.dk>
Examples
data(Diabetes)
u <- univariateTable(gender~age+location+Q(BMI)+height+weight,
data=Diabetes)
summary(u)
summary(u,n=NULL)
summary(u,pvalue.digits=2,"age"="Age (years)","height"="Body height (cm)")
u2 <- univariateTable(location~age+AgeGroups+gender+height+weight,
data=Diabetes)
summary(u2)
summary(u2,drop.reference=TRUE)
## same but more flexible
summary(u2,drop.reference=c("binary"))
## same but even more flexible
summary(u2,drop.reference=c("gender"))