Q:

add column to existing column in r

How do I convert 2 columns from a data.frame onto 2 different columns?
I.E:
Data
    A B C D
    1 3 5 7
    2 4 6 8

to
Data
    A B
    1 3
    2 4
    5 7
    6 8

A:

You can use rbind
rbind(df[,1:2], data.frame(A = df$C, B = df$D))

