ff_row_totals | R Documentation |
summary_factorlist()
outputThis adds a total and missing count to variables. This is useful for
continuous variables. Compare this to summary_factorlist(total_col =
TRUE)
which includes a count for each dummy variable as a factor and mean
(sd) or median (iqr) for continuous variables.
ff_row_totals(
df.in,
.data,
dependent,
explanatory,
missing_column = TRUE,
percent = TRUE,
digits = 1,
na_include_dependent = FALSE,
na_complete_cases = FALSE,
total_name = "Total N",
na_name = "Missing N"
)
finalfit_row_totals(
df.in,
.data,
dependent,
explanatory,
missing_column = TRUE,
percent = TRUE,
digits = 1,
na_include_dependent = FALSE,
na_complete_cases = FALSE,
total_name = "Total N",
na_name = "Missing N"
)
df.in |
|
.data |
Data frame used to create |
dependent |
Character. Name of dependent variable. |
explanatory |
Character vector of any length: name(s) of explanatory variables. |
missing_column |
Logical. Include a column of counts of missing data. |
percent |
Logical. Include percentage. |
digits |
Integer length 1. Number of digits for percentage. |
na_include_dependent |
Logical. When TRUE, missing data in the dependent variable is included in totals. |
na_complete_cases |
Logical. When TRUE, missing data counts for variables are for compelte cases across all included variables. |
total_name |
Character. Name of total column. |
na_name |
Character. Name of missing column. |
Data frame.
explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = 'mort_5yr'
colon_s %>%
summary_factorlist(dependent, explanatory) %>%
ff_row_totals(colon_s, dependent, explanatory)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.