Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. data1
  2. month1 year
  3. 1: 1 2014
  4. 2: 2 2015
  5. 3: 3 2016
  6. ..
  7.  
  8. data2
  9. month2
  10. 1: 4
  11. 2: 5
  12. 3: 6
  13. ..
  14.  
  15. for(i in 1:10){
  16. s1_i = sample(data1[month = i ], 100, replace=TRUE)
  17. s2_i = sample(data2[month > i ], 100, replace=TRUE)
  18. new_i = cbind(s1_i,s2_i)
  19. }
  20. allsamples = rbind(new_1,new_2,new_3,...)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement