I am trying to sort a contents of a data frame column alphabetically in R, e.g., I have joined two columns
col_1, col_2, col_joined
A, B, A_B,
A, B, A_B,
B, A, B_A,
I would like to have it like:
A, B, A_B,
A, B, A_B,
B, A, A_B,
Not really sure how to do that. Many thanks for your help.