standardize_column_order {insight} | R Documentation |
Standardizes order of columns for dataframes and other objects from easystats and broom ecosystem packages.
standardize_column_order(data, ...) ## S3 method for class 'parameters_model' standardize_column_order(data, style = c("easystats", "broom"), ...)
data |
A data frame. In particular, objects from easystats
package functions like
|
... |
Currently not used. |
style |
Standardization can either be based on the naming conventions from the easystats-project, or on broom's naming scheme. |
A data frame, with standardized column order.
# easystats conventions df1 <- cbind.data.frame( CI_low = -2.873, t = 5.494, CI_high = -1.088, p = 0.00001, Parameter = -1.980, CI = 0.95, df = 29.234, Method = "Student's t-test" ) standardize_column_order(df1, style = "easystats") # broom conventions df2 <- cbind.data.frame( conf.low = -2.873, statistic = 5.494, conf.high = -1.088, p.value = 0.00001, estimate = -1.980, conf.level = 0.95, df = 29.234, method = "Student's t-test" ) standardize_column_order(df2, style = "broom")