sample.simple {animation}R Documentation

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').

Author(s)

Yihui Xie

References

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

See Also

sample

Examples

sample.simple()

## Not run:  

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

## End(Not run)

[Package animation version 0.2-0 Index]