Learn R Programming

keyed (version 0.1.3)

check_drift: Check for drift from committed snapshot

Description

Compares current data against its committed reference snapshot. Returns diagnostic information about changes.

Usage

check_drift(.data, reference = NULL)

Value

A drift report (class keyed_drift_report), or NULL if no snapshot found.

Arguments

.data

A data frame with a snapshot reference.

reference

Optional content hash to compare against. If NULL, uses the attached snapshot reference.

Examples

Run this code
df <- key(data.frame(id = 1:3, x = c("a", "b", "c")), id)
df <- commit_keyed(df)

# Modify the data
df$x[1] <- "modified"
check_drift(df)

Run the code above in your browser using DataLab