View source: R/format_standardize.R
format_standardize | R Documentation |
Transform a standardized vector into character, e.g., c("-1 SD", "Mean", "+1 SD")
.
format_standardize( x, reference = x, robust = FALSE, digits = 1, protect_integers = TRUE, ... )
x |
A standardized numeric vector. |
reference |
The reference vector from which to compute the mean and SD. |
robust |
Logical, if |
digits |
Number of digits for rounding or significant figures. May also
be |
protect_integers |
Should integers be kept as integers (i.e., without decimals)? |
... |
Other arguments to pass to |
format_standardize(c(-1, 0, 1)) format_standardize(c(-1, 0, 1, 2), reference = rnorm(1000)) format_standardize(c(-1, 0, 1, 2), reference = rnorm(1000), robust = TRUE) format_standardize(standardize(mtcars$wt), digits = 1) format_standardize(standardize(mtcars$wt, robust = TRUE), digits = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.