Description Usage Arguments Details Value Author(s) Examples
Creates a summary table of a data set in a matrix object for pretty printing via xtable
.
1 |
formula |
A |
data |
A |
latex |
A logical variable that determines whether the resulting output will be part of a LaTeX document. Defaults to |
na.action |
A function to handle missing data. See |
... |
Additional arguments passed to SummarizeVar, such as |
This is generally used to create demographics table and used with the package xtable to print. To get proper names to display,
a data.frame
should be constructed such that the variable names are what the users want to be displayed. For factor
variables,
the user should make use of the levels
and labels
arguments in factor
.
A matrix to be used with xtable
, which in turn should be used in print.xtable
.
Vinh Nguyen
1 2 3 4 5 6 7 8 9 | set.seed(1)
n <- 50
df <- data.frame(trt=sample(0:1, 2*n, replace=TRUE), x1=runif(2*n), x2=rnorm(2*n),
x3=sample(c("a", "b", "c"), 2*n, replace=TRUE))
demographics(~x1+x2+x3, data=df)
demographics(trt~x1+x2+x3, data=df)
demographics(~., data=df)
demographics(trt~., data=df, decimalFactor=2)
## Not run: print(xtable(Summarize(trt~., data=df)), sanitize.text.function=identity)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.