Learn R Programming

keyed (version 0.1.3)

compare_structure: Compare structure of two data frames

Description

Compares the structural properties of two data frames without comparing actual values. Useful for detecting schema drift.

Usage

compare_structure(x, y)

Value

A structure comparison object.

Arguments

x

First data frame.

y

Second data frame.

Examples

Run this code
df1 <- data.frame(id = 1:3, x = c("a", "b", "c"))
df2 <- data.frame(id = 1:5, x = c("a", "b", "c", "d", "e"), y = 1:5)
compare_structure(df1, df2)

Run the code above in your browser using DataLab