compare_variables: Compare Variables of Two Datasets

View source: R/compare_variables.R

compare_variablesR Documentation

Compare Variables of Two Datasets

Description

Compares the structural attributes of two datasets including column names, data types, and variable ordering. Identifies common columns and reports columns that exist in only one dataset.

Usage

compare_variables(df1, df2)

Arguments

df1

A data frame representing the first dataset.

df2

A data frame representing the second dataset.

Value

A list containing variable comparison details and discrepancy count.

Examples


  df1 <- data.frame(id = 1:3, name = c("A", "B", "C"))
  df2 <- data.frame(id = 1:3, name = c("A", "B", "C"), score = c(90, 80, 70))
  compare_variables(df1, df2)


clinCompare documentation built on Feb. 19, 2026, 1:07 a.m.