View source: R/private_functions.R
prGetStatistics | R Documentation |
A simple function applied by the getDescriptionStatsBy
for the total column.
prGetStatistics(
x,
show_perc = FALSE,
html = TRUE,
digits = 1,
digits.nonzero = NA,
numbers_first = TRUE,
useNA = c("ifany", "no", "always"),
useNA.digits = digits,
show_all_values = FALSE,
continuous_fn = describeMean,
factor_fn = describeFactors,
prop_fn = factor_fn,
percentage_sign = TRUE,
default_ref = NULL
)
x |
If a data.frame it will be used as the data source for the variables in the |
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 |
show_all_values |
Show all values in proportions. For factors with only two values
it is most sane to only show one option as the other one will just be a complement
to the first, i.e. we want to convey a proportion. For instance sex - if you know
gender then automatically you know the distribution of the other sex as it's 100 % - other %.
To choose which one you want to show then set the |
continuous_fn |
The method to describe continuous variables. The
default is |
factor_fn |
The method used to describe factors, see |
prop_fn |
The method used to describe proportions, see |
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. |
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. |
A matrix or a vector depending on the settings
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.