Takes repeated samples without replacement from the population. See the Details section below for further information.
Arguments
- k
integer, the number of repeated samples to generate
- N
positive integer value, the population size
- n
positive integer value, the sample size
- prob
(optional) N-length vector of positive numeric values, the probability weights for obtaining the
N
elements
Details
This function takes repeated samples by using the replicate
function and the sampleWithoutReplacement
sampling
function.
Examples
#Set seed for reproducibility
set.seed(seed = 5381L)
#Take two samples without replacement
repeatedSampleWithoutReplacement(
k = 2,
N = 10,
n = 6
)
#> [[1]]
#> [1] 1 9 7 2 4 3
#>
#> [[2]]
#> [1] 4 1 9 3 8 10
#>