transferring data from one df to another

HI there, I have 2 datasets - one with ~600 columns matching a sample ID to the person's age, and another with ~4000 columns showing sample results for the person of interest. In my experiment, I've collected multiple samples for each person, which is why there are so many more columns in the 2nd dataset. I would like to match the age from df1 to sample ID in df2 (keep in mind there are multiple rows of each sample ID corresponding to each sample - e.g . person a, person a, person a, person b, person b, person b...) whereas df1 shows the age corresponding to each 'person'. How can I mutate df2 to add the age corresponding to each sample - e.g. (52, 52, 52, 64, 64, 64.... and so on).

Hope it makes sense, thank you in advance!

Are you joining here?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.