Stores a hash-based snapshot of the current data state. Only one active reference per data frame (identified by its content hash).
Details
The snapshot stores:
Row count
Column names and types
Hash of key columns (if keyed)
Hash of full content
Snapshots are stored in memory for the session. They are keyed by content hash, so identical data shares the same snapshot.
Examples
df <- key(data.frame(id = 1:3, x = c("a", "b", "c")), id)
df <- commit_keyed(df)
# Later, check for drift
df2 <- df
df2$x[1] <- "z"
check_drift(df2)