I have this data frame:
Name type1 type2 type3 ... typeN color
John 8.7 0 NA ... 56 blue
Andy 45 34 9.7 ... NA yellow
I need to change it to be like:
color typeName Name value
blue type1 John 8.7
blue type2 John 0
blue type3 John NA
.
.
.
blue typeN John 56
yellow type1 Andy 45
yellow type2 Andy 34
yellow type3 Andy 9.7
.
.
.
yellow typeN Andy NA
I'm a little bit confused about how to do that, any help please?