reorder dataframe cols r code example
Example: reorder dataframe cols r
col_order <- c("Species", "Petal.Width", "Sepal.Length",
"Sepal.Width", "Petal.Length")
my_data2 <- my_data[, col_order]
col_order <- c("Species", "Petal.Width", "Sepal.Length",
"Sepal.Width", "Petal.Length")
my_data2 <- my_data[, col_order]