Possible Duplicate:
Sampling in R from vector of varying length
I have a vector a=5
and would like to use the sample function sample(a)
.
To my surprise this does not always return the number 5 but sometimes 4,3, etc.
What am I missing?
Possible Duplicate:
Sampling in R from vector of varying length
I have a vector a=5
and would like to use the sample function sample(a)
.
To my surprise this does not always return the number 5 but sometimes 4,3, etc.
What am I missing?