Code for merging data from different studies in a transparent way