powered by
Stores a snapshot of the current data state, including the full data frame. This enables cell-level drift reports when used with check_drift().
check_drift()
stamp(.data, name = NULL, .silent = FALSE)commit_keyed(.data, name = NULL)
commit_keyed(.data, name = NULL)
Invisibly returns .data with snapshot metadata attached.
.data
A data frame (preferably keyed).
Optional name for the snapshot. If NULL, derived from data.
If TRUE, suppress cli output. Used internally by auto-stamping in watch()ed data frames.
TRUE
watch()
Snapshots are stored in memory for the session. They are keyed by content hash, so identical data shares the same snapshot.
When data is watch()ed, dplyr verbs auto-stamp before executing, creating an automatic safety net for drift detection.
watch() for automatic stamping before dplyr verbs.
df <- key(data.frame(id = 1:3, x = c("a", "b", "c")), id) df <- stamp(df) # Later, check for drift df2 <- df df2$x[1] <- "z" check_drift(df2)
Run the code above in your browser using DataLab