systematic_labels {stratifiedyh} | R Documentation |
Systematic Sampling and Labeling
Description
This function performs systematic sampling on the dataframe and assigns "Yes" or "No" labels to rows based on the specified interval.
Usage
systematic_labels(df, group_col, sampling_interval)
Arguments
df |
A data frame containing the data. |
group_col |
A character string specifying the column to use for grouping. |
sampling_interval |
A numeric value representing the interval for systematic sampling. |
Value
A data frame with an additional column "Systematic_Yes_No" containing the systematically sampled "Yes"/"No" labels.
Examples
result <- systematic_labels(iris, group_col = "Species", sampling_interval = 2)
[Package stratifiedyh version 0.1.0 Index]