Displaying 1 result from an estimated 1 matches for "tp3605486p3606011".
2011 Jun 17
3
Size argument in sample function
Hi All,
I'd like to randomly sample a vector N times, where each successive random
sample increases in size. I have realised that the function sample does not
take vectors for arguments. For example,
x<-rnorm(20,0,1)
sample(x,c(1,2,3)) ## will only return one random sample of size 1.
The trick seems to be getting past the size argument of the function. I've
tried different things