sample.cluster {animation}R Documentation

Demonstration for cluster sampling

Description

Every rectangle stands for a cluster, and the simple random sampling without replacement is performed for each cluster. All points in the clusters being sampled will be drawn out.

Usage

sample.cluster(pop = ceiling(10 * runif(10, 0.2, 1)), 
    size = 3, control = ani.control(interval = 0.2), ...)

Arguments

pop a vector for the size of each cluster in the population.
size the number of clusters to be drawn out.
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.cluster()

## Not run:  

# HTML animation page
ani.start()
sample.cluster(pop = sample(15, 5), size = 2, saveANI = TRUE)
ani.stop() 

## End(Not run)

[Package animation version 0.2-0 Index]