'Creating a data frame of missing values

I am working with petroleum company financial data and exploration data in RStudio

I have two data frames, AS and xpl.

When merging the two with merged = xpl %>% inner_join(AS, by=c("NPD_id", "year")), I lose some 90 observations from xpl.

Is there an easy way to create a new data frame from these missing 90 observations? A command which tells R to look for observations found in xpl, but not merged, and disregard the observations which are present in both frames maybe?

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source