You most probably have duplicates in either d
or p
or both of them. Try keeping only one row for each unique INC_KEY
value before joining.
library(dplyr)
dp <- inner_join(d %>% distinct(INC_KEY, .keep_all = TRUE),
p %>% distinct(INC_KEY, .keep_all = TRUE),by="INC_KEY")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…