powered by
This function performs systematic sampling on the dataframe and assigns "Yes" or "No" labels to rows based on the specified interval.
systematic_labels(df, group_col, sampling_interval)
A data frame with an additional column "Systematic_Yes_No" containing the systematically sampled "Yes"/"No" labels.
A data frame containing the data.
A character string specifying the column to use for grouping.
A numeric value representing the interval for systematic sampling.
result <- systematic_labels(iris, group_col = "Species", sampling_interval = 2)
Run the code above in your browser using DataLab