take_samples: Take Samples Based on Strata

View source: R/sample_existing_strat.R

take_samplesR Documentation

Take Samples Based on Strata

Description

This function takes a data frame of existing data, a data frame of desired sample sizes for each strata, and a strata variable name, and returns a sample of the existing data based on the sample sizes for the specified strata.

Usage

take_samples(existing, toSample, strata)

Arguments

existing

A data frame containing existing data.

toSample

A data frame specifying the desired sample sizes for each strata.

strata

A string specifying the name of the variable used to define strata.

Value

A data frame containing a sample of the existing data based on the sample sizes for the specified strata.


tgoodbody/sgsR documentation built on March 7, 2024, 2:20 a.m.