I need help in rearranging my data set from right to left in R. This is the original dataset:
Sorry for the confusion, but they are not string. It is a dataset like:
Column_a, Column_b, Column_c, Column_d, Column_e, Column_f, Column_g
A A B B C
A B A C
A C B A C B B
Using rev function, i get this:
Column_a, Column_b, Column_c, Column_d, Column_e, Column_f, Column_g
C B B A A
C A B A
B B C A B C A
But how to get rid of those blank/NA cells?
The Ideal output looks like this:
Column_a, Column_b, Column_c, Column_d, Column_e, Column_f, Column_g
C B B A A
C A B A
B B C A B C A
Thanks!