Calculate sampling interval

calculate_sampling_interval(
  n_sample,
  n_total,
  rounding = c("floor", "ceiling")
)

Arguments

n_sample

Number of sample required

n_total

Total number to sample from

rounding

Should the result be rounded up (ceiling) or rounded down (floor)? Default is rounded down.

Value

An integer value representing the sampling interval.

Author

Ernest Guevarra

Examples

calculate_sampling_interval(30, 200)
#> [1] 6