Guest User

Untitled

a guest
Dec 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. df <- data.frame(id = rep(seq(1:10),3),
  2. time = rep(1:3, each=10),
  3. x = rnorm(n=30),
  4. y = rnorm(n=30))
  5.  
  6. > head(df)
  7. id time x y
  8. 1 1 1 -2.62671241 0.01669755
  9. 2 2 1 -1.69862885 0.24992634
  10. 3 3 1 1.01820778 -1.04754037
  11. 4 4 1 0.97561596 0.35216040
  12. 5 5 1 0.60367158 -0.78066767
  13. 6 6 1 -0.03761868 1.08173157
  14. > tail(df)
  15. id time x y
  16. 25 5 3 0.03621258 -1.1134368
  17. 26 6 3 -0.25900538 1.6009824
  18. 27 7 3 0.13996626 0.1359013
  19. 28 8 3 -0.60364935 1.5750232
  20. 29 9 3 0.89618748 0.0294315
  21. 30 10 3 0.14709567 0.5461084
Add Comment
Please, Sign In to add comment