I have two data frames of this format
df1=data.frame( Date = c(1,2,3,4,5), customer1 = c(6,7,8,4,2), customer2 =
c(2,3,6,5,3)... )
df2=data.frame( Date = c(1,2,3,4,5), order1 = c(0,1,3,0,1), order2 =
c(0,1,0,0,2).. )
i want a result that intertwines the two data frames along with the date column.
Date Customer1 Order1 Date Customer2 Order2 Date ....
1 6 0 1 2 0 1
2 7 1 2 3 1 2
3 8 3 3 6 0 3
4 4 0 4 5 0 4
5 2 1 5 3 2 5
I used a for loop running along the no. of columns and cbind to achieve the desired result. I wanted to know if there are simpler, more efficient ways to do it.