create_table: Create a table describing the dataframe.

Description Usage Arguments Value Examples

View source: R/create_table.R

Description

Create a table describing the dataframe.

Usage

1
create_table(X, vars = NULL, names = NULL, strata = NULL)

Arguments

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.

Value

Returns a matrix which containing a description of the variables.

Examples

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)

DaanNieboer/DCTFmisc documentation built on May 29, 2019, 12:06 a.m.