createSRS: Create a Simple Random Sample Without Replacement.

View source: R/createSRS.R

createSRSR Documentation

Create a Simple Random Sample Without Replacement.

Description

Create a simple random sample, either without replacement (the default setting), or with replacement.

Usage

createSRS(popdata, n1, seed = NA, replace = F)

Arguments

popdata

grid of population to be sampled.

n1

initial sample size (sampled according to simple random sampling without replacement).

seed

vector of numbers to feed to set.seed() so that the sampling is reproducible. Defaults to NA so that it is not necessary to specific a random number seed.

replace

Should sampling be done with replacement? Defaults to FALSE.

Value

A restricted adaptive cluster sample.

Examples

# example
# create the population
# create the patch
# then sample

data(Thompson1990Fig1Pop)
data(Thompson1990Figure1Sample)
Z = createSRS(Thompson1990Fig1Pop, seed=2, n1=10)

ksauby/ACS documentation built on Aug. 18, 2022, 3:33 a.m.