I got one for you guys!
I have 2 data frames, the rownames for both are identical
df1 is 16x1
df2 is 16x785
I want to take each column of df2 and divide it by df1, then take the log of this value and store in a new df3
so, example, lets say df1 and df2 looked like this:
df1 df2 [one] [one] [two] [three] [A] 5 [A] 10 5 15 [B] 7 [B] 7 14 21 [C] 9 [C] 9 9 18
The resulting data would look like this after division, with the same dimensions as df2:
[one] [two] [three] [A] 2 1 3 [B] 1 2 3 [C] 1 1 2
Then the log of this is easy of course.
I tried dividing df2/df1 and got the old:
'/' only defined for equally-sized data frames error
Thanks in advance!