Why do I receive the same data and average?
d = c(13,18,12,9,10,8,11,9,24,10)
> sample(d,10,replace=T)
[1] 11 24 10 8 10 24 13 12 24 13
> rep(sample(d,10,replace=T),10)
[1] 8 12 18 18 9 10 12 9 9 8 8 12 18 18 9 10 12 9 9 8 8 12 18 18 9
[26] 10 12 9 9 8 8 12 18 18 9 10 12 9 9 8 8 12 18 18 9 10 12 9 9 8
[51] 8 12 18 18 9 10 12 9 9 8 8 12 18 18 9 10 12 9 9 8 8 12 18 18 9
[76] 10 12 9 9 8 8 12 18 18 9 10 12 9 9 8 8 12 18 18 9 10 12 9 9 8
> rep(mean(sample(d,10,replace=T)),10)
[1] 11.3 11.3 11.3 11.3 11.3 11.3 11.3 11.3 11.3 11.3
I want to calculate the average of consecutive draws.
Thank you for your help.