combining two different table sets

The desired result: Combine Table 1 with Table 2
Table 3
County State Zip Unique Tracking Number FIIPS code
Clark WA 98685 xyz121 123
Yacolt WA 98685 xyz122 123
King WA 98685 xyz123 123
Skamania WA 98685 xyz124 123
Hood WA 98684 xyz125 222

I tried to do a join with no results. Tomorrow, I am going to re-try the join but make sure that table 1 and table 2 are both in alphabetical order with regards to County and State.

Essentially, I just need to attach FIIPS to the main data frame.

Attempt at a join
sc<-left_join (Table1, Table2) didnt get the FIPPS code attached

tried to create a column in table 1 called FIIPS
id$FIPPS<-''
sc<-left_join (Table1, Table2) didnt get the FIPPS code attached

If county, state,, zip are the same then why am I unable to keep the unique tracking number and add in the fipps column?

Thanks!

image

We need a reproducible example (reprex)

Possibly:

left_join(Table1, Table2, by = c('County', 'State', 'Zip'))

But yes, it would be good if you provide a reproducibe example and also the error that shows up when you try to join.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.