Learn R Programming

samplingR (version 1.0.1)

syst.sample: Systematic sampling sample

Description

Retrieves a \(\frac{N}{n}\) systematic sample

Usage

syst.sample(N, n, data)

Value

Vector of size n with numbers from 1 to N indicating the index samples to be taken. If data is provided then the instances will be returned.

Arguments

N

Population size.

n

Sample size

data

Optional data of the population.

Details

If \(\frac{N}{n}\) is not an even number a 1 in floor(\(\frac{N}{n}\)) sample will be taken.

Examples

Run this code
data<-runif(40)
syst.sample(40,8, data)

Run the code above in your browser using DataLab