Check additions/updates between dataframes

library(tidyverse)
dplyr::setdiff(a2,a1) %>% mutate(key_in_first = key %in% pull(a1,key))

in this case you can show the differences by row of the 2nd as compared to 1st, and distinguish additions from updates by reference to the key