update_ban() checks consistency between versions of BAN, based on "id" and "address". If "address" is not present in some version, a call to format_adress() is performed. For consistent observations, "ban_version" is updated to the final version. For inconsistent observations, it tries to create some updates.

Firste, if an observation with consistent "id" is found, "address" is updated. Secondly, if an observation with consistent "address" is found, "id" is updated. For those automatic corrections, "ban_version" is updated.

Remaining inconsistent observations are kept as is. They are also extracted in a dataset to help manual corrections to be performed.

update_ban(
  ban_i,
  ban_f,
  v_i,
  v_f,
  correction,
  id_ban_i = "id",
  id_ban_f = id_ban_i
)

Arguments

ban_i

dataframe, initial version of BAN data.

ban_f

dataframe, final version of BAN data.

v_i

character, version of the initial BAN.

v_f

character, version of the final BAN.

correction

dataframe, corrections that remain to be performed manually.

id_ban_i

character, column that is to be used as id in ban_i.

id_ban_f

character, column that is to be used as id in ban_f.

Value

List with updated ban_i (data.frame), manual corrections to be performed (data.frame), and summary of changes made (vector).

Details

To be specified.