compare metabolites of baseline and postbaseline for same people

11 Views Asked by At

I have two datasets. One is baseline and the other is post baseline

1st one and 2nd one contains same people.

1st table: Baseline

People metabolite 1 metabolite298 metabolite 333 metabolite999
ABC1 989.00 2.33 198297.09
ABC2 7675.99 5.67 197233.45

2nd table: Postbaseline

People metabolite298 metabolite333 metabolite4 metabolite78
ABC1 97.11 5763.00 65645 122
ABC2 98 777 121 2

Now I want to have a table where I will have a ratio of postbaseline/baseline of the common metabolites only.

So I want to have a table like this.

People Metabolite298 metabolite333
ABC1 97.11/2.33 5763.00/198297.09
ABC2 98/5.67 777/197233.45

Can you please provide any code for this?

I tried to do cbind but I could not isolate the common ones only. Can you please help me out with it?

0

There are 0 best solutions below