kenhanscombe / ukbtools

An R package to manipulate and explore UK Biobank data
https://kenhanscombe.github.io/ukbtools/
96 stars 26 forks source link

Is there an option from ukbtools to automatically collapse cohorts into one column? #36

Closed garyzhubc closed 3 years ago

garyzhubc commented 3 years ago

Is there an option from ukbtools to automatically collapse cohorts into one column? For example, collapsing

"hdl_cholesterol_f30760_0_0" "hdl_cholesterol_f30760_1_0"

to

"hdl_cholesterol_f30760"

kenhanscombe commented 3 years ago

No, because there's no single best way to combine multiple instances and arrays (captured by the last two integers in the name). How you combine them, if at all, is phenotype dependent.