The similar questions on this topic all used spread() and gather() which are retired Tidyverse functions. Let's say I have a tibble as such:
people 1 2 3. 4 5
person1 27000 30000 40000 50000 60000
person2 27000 30000 40000 50000 60000
person3 27000 30000 40000 50000 60000
person4 27000 30000 40000 50000 60000
And I want to transpose this as such
People Person1 Person2 Person3 Person4 Person5
1. 270000 270000 270000. 270000. 270000
2. 30000. 30000. 30000 30000. 30000
3
4
5. 60000. 60000. 60000 60000 60000
(Didn't fill the third and fourth columns just to save myself time, but they should have been filled.