I have two dfs with same sample names. However, the sample names in df1 repeat many times, while df2 is with only one time of sample names. For example, df1 is with 3 times of sample names, while df2 is with one time of sample names. Now I want to combine or fill the information of df2 into df1 for all the samples.
df1
value
sample1 0.5
sample2 0.3
sample3 0.1
sample1 0.5
sample2 0.3
sample3 0.1
sample1 0.5
sample2 0.3
sample3 0.1
df2
treatment dose
sample1 a 1
sample2 b 2
sample3 c 3
The expected result should be like below:
gene treatment dose
sample1 0.5 a 1
sample2 0.3 b 2
sample3 0.1 c 3
sample1 0.5 a 1
sample2 0.3 b 2
sample3 0.1 c 3
sample1 0.5 a 1
sample2 0.3 b 2
sample3 0.1 c 3
Thank you very much for your help.