
17 Mai
2013
17 Mai
'13
18:07
f <- function(x, k=1, ...) cbind(x=x,i=c((k+1):length(x),1:k))[sample(1:length(x), ...),] exemplo: f(1:5, k=3, size=1)