Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(data.table)
- dat <- data.table(id=1:10, group=rep(1:2, each=5), x=rnorm(10))
- > dat
- id group x
- 1: 1 1 -0.39384959
- 2: 2 1 -0.03081369
- 3: 3 1 -1.30571673
- 4: 4 1 -1.82379155
- 5: 5 1 2.36751011
- 6: 6 2 0.21523454
- 7: 7 2 -0.18905780
- 8: 8 2 1.80707868
- 9: 9 2 0.88348164
- 10: 10 2 0.38374826
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement