I have a few small data frames each with one row that are results from a mediation analysis. I need to rearrange the cells to be three rows, each with two of the variables and their corresponding coefficient. Example below:

HAVE DATA:

```
lab_x lab_m lab_y    coef_xm    coef_my   coef_xy
    x     m     y   -0.21***    0.08*** -0.084***

```

WANT DATA:

```
var1   var2        coef
   x      m    -0.21***
   m      y     0.08***
   x      y   -0.084***

```

**UPDATE**

Changing the data slightly, I need to keep the variable names that appear originally in the DF

```
df<-read.table(text="lab_x lab_m lab_y    coef_xm    coef_my   coef_xy
    v1    v2        v3  -0.21***    0.08*** -0.084***", header = TRUE)

```

WANT:

```
 var1    var2        coef
   v1      v2    -0.21***
   v2      v3     0.08***
   v1      v3   -0.084***

```