I have a data frame looking like this : data.frame name cond
CONDITION CONT1 CONT2 CONT3 CONT4
result 16.2 2.5 6.5 0.75
Test.ratio 0.23 0.15 2.5 3.5
What I want to do get is:
CONDITION Result test.ratio
CONT1 16.2 0.62
CONT2 2.5 0.15
CONT3 6.5 2.5
CONT4 0.75 3.5
I tried using the melt function but it didnt work.
Cond.long <- melt(cond, idvar = "condition"))
I'm new to R.