.BG
.FN sample
.TL
Generate Random Samples or Permutations of Data
.CS
sample(x, size, replace=FALSE)
.AG x
numeric or character vector of data (the population) to be
sampled, or a positive integer giving the size of the population,
which is then taken to be `1:x'.
Missing values (`NA's) are allowed.
.AG size
sample size.  Default is the same as the population size,
and thus (with `replace=FALSE') will generate a random
permutation.
.AG replace
if `TRUE', sampling will be done with
replacement.
.RT
if `length(x)>1' a sample from
`x'; otherwise, the result is a set of integers between 1
and `x' giving the indices of the selected elements.
.EX
sample(state.name,10)   # pick 10 states at random
sample(1e6,75)  # pick 75 numbers between 1 and one million
sample(50)    # random permutation of numbers 1:50
.KW distribution
.WR
