df_reorder {PAutilities} | R Documentation |
Reorder the columns of a data frame
Description
Reorder the columns of a data frame
Usage
df_reorder(df, columns, after)
Arguments
df |
the data frame |
columns |
the column(s) to move (either as character names or numeric indices) |
after |
the column after which to insert |
Value
The reordered data frame
Examples
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")
[Package PAutilities version 1.2.1 Index]