Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df <- data.frame(id = rep(seq(1:10),3),
- time = rep(1:3, each=10),
- x = rnorm(n=30),
- y = rnorm(n=30))
- > head(df)
- id time x y
- 1 1 1 -2.62671241 0.01669755
- 2 2 1 -1.69862885 0.24992634
- 3 3 1 1.01820778 -1.04754037
- 4 4 1 0.97561596 0.35216040
- 5 5 1 0.60367158 -0.78066767
- 6 6 1 -0.03761868 1.08173157
- > tail(df)
- id time x y
- 25 5 3 0.03621258 -1.1134368
- 26 6 3 -0.25900538 1.6009824
- 27 7 3 0.13996626 0.1359013
- 28 8 3 -0.60364935 1.5750232
- 29 9 3 0.89618748 0.0294315
- 30 10 3 0.14709567 0.5461084
Add Comment
Please, Sign In to add comment