I have two columns in a data frame, and I'd like to interweave them to be a single column. For example, suppose:
col1 <- c(1,2,3,4)
col2 <- c(5,6,7,8)
df <- cbind(col1, col2)
I'd like the result to look something like:
> df$col
1
5
2
6
3
7
4
8
Any help would be greatly appreciated! Thanks.