Question Details

No question body available.

Tags

r

Answers (3)

June 6, 2026 Score: 4 Rep: 13,052 Quality: Low Completeness: 10%

Stack Overflow is not the place to ask others to write your code for you, though the community is very willing to help you solve specific problems you encounter whilst writing it for yourself. What have you tried so far and why didn't it work?

Moreover, in my opinion this is not really an "Advice" question. I believe it is a simple "How do I...?" which has probably be answered elsewhere on the site.

June 6, 2026 Score: 2 Rep: 274,440 Quality: Medium Completeness: 60%

For each element of chknm use which/flike to find index of the first substring match in nmlist and then use fcase to set match. Finally ensure that the order in which the columns appear is as in dtout and compare.

library(data.table)

dt2
June 6, 2026 Score: 1 Rep: 274,440 Quality: Low Completeness: 0%

The poster provided a reproducible example for a tricky problem. The question seems appropriate here.