Hello,

I have a dataset where there are places visited listed in a descending order (variables A_1/2/3 in my example).

I would like to find an automated way to rearrange this order to be in an ascending order (variables B_1/2/3 in my example).

A_3 <- c("a", "b", "c")

A_2 <- c("d", "e")

A_1 <- c("f")

B_1 <- c("f", "e", "c")

B_2 <- c("d", "b")

B_3 <- c("a")length(A_1)<-3; length(A_2)<-3; length(A_3)<-3;length(B_1)<-3; length(B_2)<-3; length(B_3)<-3

df <- as.data.frame (m <-cbind (A_3,A_2,A_1, B_1, B_2, B_3))

print (df)

How can I do that ? I can't figure it out

Many thanks

Best regards