Skip to contents

Low-level accessor to the frame digest that execute() records. Returns NULL when the sample carries no digest. When a digest is present, its effective status is computed lazily: the stored digest is immutable, and a sample that no longer matches its executed realization (per the sealed integrity record) reports status "invalidated" without the digest itself being rewritten. Adding analysis columns does not touch protected columns and therefore does not invalidate.

Usage

get_frame_digest(x)

Arguments

x

A tbl_sample object produced by execute().

Value

The frame digest list, or NULL when none is recorded.

Details

This is an extension API for packages that build on the digest (such as samplens, which draws it as a sampling card). The version field of the stored digest is validated before returning. The list structure of the returned digest is internal and versioned: it may change between samplyr releases, so extension packages should pin a minimum samplyr version. frame_summary() is the stable tabular interface for everyone else.

See also

frame_summary()

Other extension APIs: digest, exante_digest()

Examples

sample <- sampling_design() |>
  stratify_by(region) |>
  draw(n = 20) |>
  execute(bfa_eas, seed = 1)

digest <- get_frame_digest(sample)
names(digest)
#> [1] "version" "status"  "privacy" "frames"  "stages" 
digest$status
#> [1] "complete"

# NULL for anything that is not an executed sample
get_frame_digest(bfa_eas)
#> NULL