Description Usage Arguments Value Examples
View source: R/data_describe.R
This function creates a tableby object using more intuitive default parameters. The tableby object should be passed to summary() to create a descriptive table.
1 2 3 4 5 6 7 8 9 10 |
.data |
A dataframe |
by |
Grouping variable by which data are described. If NULL (default), overall total will be shown. |
p_value |
A logical. Toggle to show p value (default is FALSE). |
total |
A logical. Toggle to show overall total (default is FALSE) when grouping variable is defined. |
digits |
An integer. Control the number of decimal place for continuous values (default is 1). |
digits.pct |
An integer. Control the number of decimal place for percents (default is 1). |
digits.pvalue |
An integer. Control the number of decimal place for p-values (default is 1). |
... |
Arguments passed to tableby(). ?tableby for more details. |
A tableby object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library(arsenal)
library(dplyr)
data(mockstudy)
mockstudy %>%
select(arm, sex, age) %>%
data_describe(by = arm) %>%
summary(text = TRUE)
mockstudy %>%
select(arm, sex, age) %>%
data_describe() %>%
summary()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.