Returns the stage indices that have been executed for a tbl_sample.
For a fully executed single-stage design, this is typically 1L. For
partial execution or continuation workflows, this indicates how far the
design has progressed.
Details
This is mainly useful for:
checking whether a multi-stage design was executed completely
writing continuation workflows that resume from the next stage
inspecting samples created with
stages =inexecute()
Examples
design <- sampling_design() |>
add_stage("EAs") |>
cluster_by(ea_id) |>
draw(n = 10) |>
add_stage("Households") |>
draw(n = 5)
stage1 <- execute(design, bfa_eas, stages = 1, seed = 1)
get_stages_executed(stage1)
#> [1] 1
full_sample <- execute(stage1, bfa_eas, seed = 2)
get_stages_executed(full_sample)
#> [1] 1 2