I have two dataframes (with 43 variables and 53 rows) from a survey, both have the same values but the rows are ordered in two random different ways.
Also, some rows have the same values as other rows. Here's an example:
DT1 <- data.frame(sex = c("M","F","M","M","F"),
Age = c(12,67,12,30,67),
V1 = c(7,7,6,6,7))
DT2 <- data.frame(sex = c("F","M","F","M","M"),
Age = c(67,12,67,12,30),
V1 = c(7,6,7,7,6))
My question is the following, is there a way to order the second dataframe as the first dataframe?