Suppose I only have access to a cbind
ed data.frame r
below. Because the variable names in the original data.frames before cbind
ing are the same, is it possible to separate r
into the original data.frames?
Note. This is just a toy example, a functional solution is appreciated.
# Original data.frames:
c1 <- data.frame(study.name = c(1,1,2,3), mod.s=c(3,3,1,2), mod.g=c(1,1,3,1))
c2 <- data.frame(study.name = c(1,1,2,3), mod.s=c(3,3,2,1), mod.g=c(1,2,3,2))
r <- cbind(c1, c2[-1]) # The only available cbined data.frame