transform_data | R Documentation |
This function applies a specified transformation to a numeric vector.
transform_data(
x,
n = NULL,
transfm = c("none", "tanh", "invlogit", "percentr", "percent", "inv_ft")
)
x |
A numeric vector. |
n |
Used with "inv_ft". A numeric value representing the sample size for proportion. |
transfm |
A character string specifying the transformation to apply. Options include: - "none": No transformation (default) - "tanh": Hyperbolic tangent transformation - "invlogit": Inverse logit transformation - "percentr": Percentage relative change transformation - "percent": Percentage transformation - "inv_ft": Inverse Freeman-Tukey (double arcsine) transformation for proportions (use with caution) |
A numeric vector with the applied transformation.
## Not run:
transform_data(c(-1, 0, 1), transfm = "tanh")
transform_data(c(-1, 0, 1), transfm = "invlogit")
transform_data(c(-1, 0, 1), transfm = "none")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.