View source: R/transformations.R
transform_data | R Documentation |
Normalise data using different methods: log, power, and root, with a different number of parameters to find out which one transforms the data into a normal-ish set.
transform_data( data, trait = "DATA", alpha = 0.05, index = NULL, transf_vals = c(2, exp(1), 3, 4, 5, 6, 7, 8, 9, 10), plots_prefix = "HIST", digits = 6 )
data |
Original data. |
trait |
Trait name. |
alpha |
Significance level. |
index |
Index of the current trait. |
transf_vals |
Transformation values. |
plots_prefix |
Prefix for plots with or without path. |
digits |
Significant digits to compare p-values of transformations. |
Transformed record.
set.seed(123) data <- rnorm(100, 5) out_exp2 <- MetaPipe::transform_data(2 ^ data, "EXP_2") out_root2 <- MetaPipe::transform_data(sqrt(data), "ROOT_2") out_pow2 <- MetaPipe::transform_data(data ^ 2, "POW_2") knitr::kable(head(out_exp2)) knitr::kable(head(out_root2)) knitr::kable(head(out_pow2)) # Clean up example outputs MetaPipe:::tidy_up("HIST")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.