How do I transpose a tibble() in R
Solution here: https://stackoverflow.com/a/28917212/3880322
library(dplyr)
library(tidyr)
df %>%
gather(key = var_name, value = value, 2:ncol(df)) %>%
spread_(key = names(df)[1],value = 'value')
As Sotos has mentioned it, you just need to re-declare your matrix as a tibble:
as_tibble(cbind(nms = names(df), t(df)))