powered by
This function helps user to transform and scale quantitative defined data (columns identitified from a given dataset) for better PCA and RDA outputs.
prep_data(data, quantitative_columns, transform_data_method, scale_data)
The transformed/scaled quantitative data frame
A data frame with at least one numeric column
Numeric vector of numeric columns position : c(1,2,4)
Method of quantitative data transformation : "log", "sqrt4", "clr", "none"
TRUE or FALSE. TRUE => scaling of quantitative columns
prep_data(mtcars, c(1:7), "log", TRUE)
Run the code above in your browser using DataLab