srswr {sampling}R Documentation

Simple random sampling with replacement

Description

Draw a simple random sampling with replacement of size n (equal probabilities, fixed sample size, with replacement).

Usage

srswr(n,N)

Arguments

n sample size.
N population size.

Details

Return a vector of size N which is the population size. Each element k of this vector indicates the number of replicates for unit k in the sample.

See Also

rmultinom, UPmultinomial

Examples

s=srswr(3,10)
#the selected units are 
(1:10)[s!=0]
#wiht the number of replicates 
s[s!=0]

[Package sampling version 0.3 Index]