1

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?

Community
  • 1
  • 1
user1723765
  • 5,959
  • 17
  • 53
  • 83

0 Answers0