View source: R/getDescriptionStatsBy_prPropDescs.R
prPropDescs | R Documentation |
Helper to [getDescriptionStatsBy()]
prPropDescs(
x,
by,
name,
default_ref,
prop_fn,
html,
digits,
digits.nonzero,
numbers_first,
useNA,
useNA.digits,
percentage_sign,
missing_value,
names_of_missing,
NEJMstyle
)
x |
If a data.frame it will be used as the data source for the variables in the |
by |
The variable that you want to split into different columns |
name |
The name of the row |
default_ref |
The default reference when dealing with proportions. When using 'dplyr' syntax ('tidyselect') you can specify a named vector/list for each column name. |
prop_fn |
The method used to describe proportions, see |
html |
If HTML compatible output should be used. If |
digits |
The number of decimals used |
digits.nonzero |
The number of decimals used for values that are close to zero |
numbers_first |
If the number should be given or if the percentage should be presented first. The second is encapsulated in parentheses (). |
useNA |
This indicates if missing should be added as a separate
row below all other. See |
useNA.digits |
The number of digits to use for the
missing percentage, defaults to the overall |
percentage_sign |
If you want to suppress the percentage sign you can set this variable to FALSE. You can also choose something else that the default % if you so wish by setting this variable. |
missing_value |
Value that is substituted for empty cells. Defaults to "-" |
names_of_missing |
Optional character vector containing the names of returned statistics,
in case all returned values for a given |
NEJMstyle |
Adds - no (%) at the end to proportions |
A [base::by] list
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.