I have a dataframe like so:
avg_cost avg_assets avg_liabilities avg_income
100432 203998 76020 89021
I want to transpose the dataframe like so in R
type stat
avg_cost 100432
avg_assets 203998
avg_liabilities 76020
avg_income 89021
I've tried using pivot_longer but I don't have a column to pivot on. I just want to transpose the whole dataframe. How can I do this?