Learn R Programming

effectsize (version 0.2.0)

format_standardize: Transform a standardized vector into character

Description

Transform a standardized vector into character, e.g., c("-1 SD", "Mean", "+1 SD").

Usage

format_standardize(x, reference = x, robust = FALSE, digits = NULL, ...)

Arguments

x

A standardized numeric vector.

reference

The reference vector from which to compute the mean and SD.

robust

Logical, if TRUE, centering is done by substracting the median from the variables and dividing it by the median absolute deviation (MAD). If FALSE, variables are standardized by substracting the mean and dividing it by the standard deviation (SD).

digits

Number of significant digits.

...

Arguments passed to or from other methods.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab