library(tidyverse)
starting_df %>%
rownames_to_column() %>%
gather(variable, value, -rowname) %>%
spread(rowname, value)
starting_df <- data.frame(row.names= c(LETTERS[1:4]),
a = c(1:4),
b = seq(0.02,0.08,by=0.02),
c = c("Aaaa","Bbbb","Cccc","Dddd")
)