Learn R Programming

animation (version 0.2-0)

sample.simple: Demonstration for simple random sampling without replacement

Description

The whole sample frame is denoted by a matrix (nrow * ncol) in the plane just for convenience, and the points being sampled are marked by red circles. Each member of the population has an equal and known chance of being selected.

Usage

sample.simple(nrow = 10, ncol = 10, size = 15, 
    control = ani.control(interval = 0.2), ...)

Arguments

nrow
the desired number of rows of the sample frame.
ncol
the desired number of columns of the sample frame.
size
the sample size.
control
control parameters for the animation; see ani.control
...
other arguments passed to ani.control

Value

  • None (invisible `NULL').

References

Cochran, W G (1977) Sampling Techniques, Wiley, ISBN 0-471-16240-X

See Also

sample

Examples

Run this code
sample.simple()

# HTML animation page
ani.start()
sample.simple(nrow = 5, size = 20, saveANI = TRUE)
ani.stop()

Run the code above in your browser using DataLab