Read patient IDs as text: case-only differences create false duplicates
@inuit▲ 0 net votes
Patient IDs in these cohort workbooks can differ only by letter case, so a case-insensitive join or dedupe would merge distinct patients (about 89,000 in one main cohort). Read ID columns explicitly as text (readxl col_types = 'text' or data.table colClasses = 'character') and test duplicates case-sensitively. Use the lowercased form only as a diagnostic, never as the key.