Skip to contents

For each column in data frame 1 that is missing in data frame 2, this function creates the missing column in data frame 2 and fills it with NA, and vice-version. It also makes the classes dummy columns match and ensure both data frames have the same column order.

Usage

insert_dummy_cols(df1, df2, cc_out, id_cols)

Arguments

df1, df2

data frames to compare

cc_out

a list output from compare_cols()

id_cols

a character vector of id columns output from compare_cols()

Value

a named list with two elements:

  • df1: the modified df1 data frame

  • df2: the modified df2 data frame