View source: R/check_data_consistency.R
check_data_consistency | R Documentation |
This function compares the column names and number of rows in two data frames and returns a message indicating whether the data is consistent or not.
check_data_consistency(df1, df2)
df1 |
First data frame to compare |
df2 |
Second data frame to compare |
A message indicating whether the data is consistent or not.
df1 <- data.frame(x = c(1,2,3), y = c(4,5,6))
df2 <- data.frame(x = c(1,2,3), y = c(4,5,6))
check_data_consistency(df1, df2)
# Data is consistent across the two sources.
df3 <- data.frame(a = c(1,2,3), b = c(4,5,6))
check_data_consistency(df1, df3)
# Data is not consistent across the two sources.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.