Created
May 20, 2020 12:36
-
-
Save micstr/2f5644b798bd226ae78516b14251577d to your computer and use it in GitHub Desktop.
Check names in two tables are the same (say pre merge)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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