take_samples {sgsR} | R Documentation |
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.
take_samples(existing, toSample, strata)
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. |
A data frame containing a sample of the existing data based on the sample sizes for the specified strata.