tbl {clintools} | R Documentation |
Create a table (tbl)
Description
tbl()
is a function which create a dataframe, which can be copied directly into
word or presented in as a summary table.
Usage
tbl(df,strata,vars,render.numeric,
render.factor, tests, paired,
digs_n,digs_f, digs_p, digs_s,
only_stats, strata.fixed, strata.random,
time.to, present.missing, markdown, caption)
Arguments
df |
dataframe. ( |
strata |
Column name of stratification ( |
vars |
Column names of variables of interest ( |
render.numeric |
list of presentation of numeric variables ( |
render.factor |
presentation of factors, with |
tests |
list of tests carried out, currently the following works: |
paired |
if tests should be paired ( |
digs_n |
digits for numeric ( |
digs_f |
digits for factors ( |
digs_p |
digits for p-values ( |
digs_s |
digits for statistics ( |
only_stats |
if only stats should be presented ( |
strata.fixed |
list of columns which should be used as fixed stratification ( |
strata.random |
list of columns which should be used as random stratification ( |
time.to |
Column name of the time column for cox regression ( |
present.missing |
default is dynamic where non-missing variables are not presented. |
markdown |
default is true and output is pander, while false output is a dataframe ( |
caption |
Table caption only in use when markdown is true ( |
Value
Returns summarised information in dataframe.
Examples
## Not run:
hmm <- tbl(df,strata="group",
vars = c("Gestational Age at birth","Maternal preeclampsia"),
tests=c("wilcox.test","glm"),only_stats=F,strata.random = "site",
markdown=F)
pander::pander(hmm, keep.line.breaks = TRUE,split.tables=Inf, row.names = F)
## End(Not run)