Guest User

Untitled

a guest
Aug 11th, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.15 KB | None | 0 0
  1. sample_n = function(v, size, replace = TRUE){
  2.   cbind(1:5, sample(v, size, replace))
  3. }
  4. do.call(rbind, replicate(100, sample_n(1:100, 5), simplify = FALSE))
Advertisement
Add Comment
Please, Sign In to add comment