Skip to content

Instantly share code, notes, and snippets.

@micstr
Created May 20, 2020 12:36
Show Gist options
  • Save micstr/2f5644b798bd226ae78516b14251577d to your computer and use it in GitHub Desktop.
Save micstr/2f5644b798bd226ae78516b14251577d to your computer and use it in GitHub Desktop.
Check names in two tables are the same (say pre merge)
# identical check - Thanks Akrun
#https://stackoverflow.com/q/26566251/4606130
#RIGHT
identical(sort(names(data.store)), sort(names(data.input))))
# TRUE
#WRONG
# I had below which is flummoxed by order
# isTRUE(all.equal(colnames(data.input), colnames(data.store)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment