df_reorder | R Documentation |
Reorder the columns of a data frame
df_reorder(df, columns, after)
df |
the data frame |
columns |
the column(s) to move (either as character names or numeric indices) |
after |
the column after which to insert |
The reordered data frame
df <- data.frame(a = 1:10, b = 11:20, c = 21:30, d = 31:40) df_reorder(df, 2:3, "d") df_reorder(df, c("c", "d"), "a")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.