Description Usage Arguments Examples
View source: R/ezsummary_categorical.r
ezsummary_categorical()
summarizes categorical data.
Shorthand for ezsummary_categorical
1 2 3 4 5 6 7 8 9 | ezsummary_categorical(tbl, n = FALSE, count = TRUE, p = TRUE,
p_type = c("decimal", "percent"), digits = 3, rounding_type = c("round",
"signif", "ceiling", "floor"), P = FALSE, round.N = 3,
flavor = c("long", "wide"), fill = 0, unit_markup = NULL)
ezsummary_c(tbl, n = FALSE, count = TRUE, p = TRUE,
p_type = c("decimal", "percent"), digits = 3, rounding_type = c("round",
"signif", "ceiling", "floor"), P = FALSE, round.N = 3,
flavor = c("long", "wide"), fill = 0, unit_markup = NULL)
|
tbl |
A vector, a data.frame or a |
n |
A T/F value; total counts of records. Default is
|
count |
A T/F value; count of records in each category.
Default is |
p |
A T/F value; proportion or percentage of records in each category.
Default is |
p_type |
A character string determining the output format of |
digits |
A numeric value determining the rounding digits; Replacement
for |
rounding_type |
A character string determining the rounding method;
possible values are |
P |
Deprecated; Will change the value of |
round.N |
Deprecated; Will change the value of |
flavor |
A character string with two possible inputs: "long" and "wide".
"Long" is the default setting which will put grouping information on the left
side of the table. It is more machine readable and is good to be passed into
the next analytical stage if needed. "Wide" is more print ready (except for
column names, which you can fix in the next step, or fix in LaTex or
packages like |
fill |
If set, missing values created by the "wide" flavor will be
replaced with this value. Please check |
unit_markup |
When unit_markup is not NULL, it will call the ezmarkup
function and perform column combination here. To make everyone's life
easier, I'm using the term "unit" here. Each unit mean each group of
statistical summary results. If you want to know mean and stand deviation,
these two values are your units so you can put something like "[. (.)]" there
#' @param P Deprecated; Will change the value of |
1 2 3 4 5 6 7 8 9 | library(dplyr)
mtcars %>%
group_by(am) %>%
select(cyl, gear, carb) %>%
ezsummary_categorical()
mtcars %>%
select(cyl, gear, carb) %>%
ezsummary_categorical(n=TRUE, round.N = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.