Advertisement
Guest User

cbind df

a guest
Dec 24th, 2015
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.20 KB | None | 0 0
  1. tableA = data.frame(x = c(71,88), y = c(82,89))
  2. tableB = data.frame(shiftx = c(0,0,1,1), shifty = c(0,1,0,1))
  3. cbind(tableA[rep(1:nrow(tableA), nrow(tableB)), ], tableB[rep(1:nrow(tableB), nrow(tableA)), ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement