I am having an issue extracting some rows from a data table. I have a table as below.
What I try to do is extracting same "TEST_DATE" rows group by "ID" For example, I want to get row number 8 and 9.
I used code below:
DUP_TEST_DATE <- SBP_VALUE[SBP_VALUE[, .I[duplicated(TEST_DATE)], by=ID]$V1]
However, this only returns the duplicated row (i.e., the row number 9 only). Would you please help me to fix the code?
Thank you!