Conditional keyed join/update _and_ update a flag column for matches
问题 This is very similar to the question @DavidArenburg asked about conditional keyed joins, with an additional bugbear that I can't seem to suss out. Basically, in addition to a conditional join, I want to define a flag saying at which step of the matching process that the match occurred; my problem is that I can only get the flag to define for all values, not the matched values. Here's what I hope is a minimal working example: DT = data.table( name = c("Joe", "Joe", "Jim", "Carol", "Joe",