sstable.baseline | R Documentation |
A function to create a simple summary baseline table.
sstable.baseline(
formula,
data,
bycol = TRUE,
pooledGroup = FALSE,
keepEmptyGroup = FALSE,
statistics = "mean, median (Q1-Q3)",
cont = NULL,
cate = NULL,
fullfreq = TRUE,
digits = 1,
test = FALSE,
pdigits = 3,
pcutoff = 1e-04,
chisq.test = FALSE,
correct = FALSE,
simulate.p.value = FALSE,
B = 2000,
workspace = 1e+06,
hybrid = FALSE,
footer = NULL,
flextable = FALSE,
bg = "#F2EFEE",
df = FALSE
)
formula |
a formula specifies variables for rows, variable for column and third-dimension variable. If formula is in the form of x+y ~ a, the function will summary x and y with respects to each value of a If formula is in the form of x+y ~ a|z, the function will summary z with respects to each value of a,x and a, y |
data |
a data frame to derive baseline table from. |
bycol |
a logical value specifies whether the summary will be by column or by row. |
pooledGroup |
a logical value specifies whether to pool all subgroups of column variable. |
keepEmptyGroup |
a logical value specifying whether should keep empty groups |
statistics |
a character specifies summary statistics for continuous row variables. |
cont |
a vector specifies whether each row variables is continuous. |
cate |
a vector specifies whether each row variables is categorical. |
digits |
a number specifies number of significant digits for numeric statistics. |
test |
a logical value specifies whether a statistical test will be performed to compare between treatment arms. |
pdigits |
a number specifies number of significant digits for p value. |
pcutoff |
a number specifies threshold value of p value to be displayed as "< pcutoff". |
chisq.test |
a logical value specifies whether Chi-squared test or Fisher's exact test will be used to compare between treatment arms. |
correct |
a parameter for chisq.test(). |
simulate.p.value |
a parameter for chisq.test() and fisher.test(). |
B |
a parameter for chisq.test() and fisher.test(). |
workspace |
a parameter for fisher.test(). |
hybrid |
a parameter for fisher.test(). |
footer |
a vector of strings to be used as footnote of table. |
flextable |
a logical value specifies whether output will be a flextable-type table. |
bg |
a character specifies color of the odd rows in the body of flextable-type table. |
df |
a logical values specifies whether output will be a draw dataframe. |
a flextable-type table or a list with values/headers/footers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.