0

I've got two tables Table A and Table B.

Each has the lookup variable that is unique and doesn't contain any duplicate and I'm using the following code to join them

All_data <- left_join(Table_A, Table_B, by = c("ID_A" = "ID_B"))

When I run this it returns NA for multiple rows of Table B data points and I cannot figure out why.

I've done some spot checking in excel to confirm the ID's match across tables and it should be matching data but it just returns NA. I can also find all the data when using vlookup in excel (not the ideal long term solution as I need to replicate this multiple times but wanted to sense check the error).

The dataset is 5000 rows and I'm missing 1300 values from Table B when I run this. Any help or advice would be greatly appreciated.

James
  • 9
  • 1
  • 1
    supply data so others can help or at least a few rows so we can troubleshoot – Mike Feb 04 '22 at 21:29
  • It looks like you're fairly new to SO; welcome to the community! If you want great answers quickly, it's best to make your question reproducible. This includes sample data like the output from `dput(head(dataObject)))`. Check it out: [making R reproducible questions](https://stackoverflow.com/q/5963269). – Kat Feb 06 '22 at 03:52
  • Please provide enough code so others can better understand or reproduce the problem. – Community Feb 12 '22 at 12:31

0 Answers0