Description Usage Arguments Value Examples
Create a table describing the dataframe.
1 | create_table(X, vars = NULL, names = NULL, strata = NULL)
|
X |
data.frame containing variables |
vars |
variables for which to create the table |
names |
Optional vector containing names which will be entered in the table |
strata |
Optional vector containing membership to different strata. Will add a column to the table for each stratum. |
Returns a matrix which containing a description of the variables.
1 2 3 4 | set.seed(1234)
X <- data.frame(age = rnorm(1000), educ = sample(0:2, replace = T, size = 1000))
strata <- sample(0:2, replace = T, size = 1000)
create_table(X, names = c("Age", "Education"), strata = strata)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.