I want to get the column name of the largest number of each row. for example, A table could be
x = c(1,2,4,4,3 )
y = c(2,3,3,5,4 )
z = c(4,5,2,1,1 )
df<-data.frame(x,y,z)
df
the results what I want to get is
x y z cloumn_name
1 1 2 4 z
2 2 3 5 z
3 4 3 2 x
4 4 5 1 y
5 3 4 1 y