rearrange.Rd
Moves variables (columns) of a data frame to positions relative to other variables in the data frame.
rearrange(data, tomove, where = "last", ba = NULL)
data | First variable to be used, required. |
---|---|
tomove | Variable(s) to be moved |
where | String that dictates position in relation to reference variable. Can be one of: "last", "first", "before", or "after". |
ba | Optional string identifying reference variable By default this is the system date, but can be specified. |
The data frame given by 'data' with the variables repositioned
# NOT RUN { gneva.treat <- rearrange(gneva.treat, "L", "after", "X") gneva.treat <- rearrange(gneva.treat, c("Cites","Amends","Supersedes"), "before", "Amended.by") # }