Assume I have a table that has TRUE and FALSE values, and I need to change the values of TRUE values to the name of column headers, and the false values to an empty space. Changing false values is easy since every cell value that is FALSE will always get changed to an empty space, so I can do this
dataset[dataset == "FALSE'] <- " "
Assume that I have row 81 under COL2, and it is TRUE, how would I change "TRUE" to "COL2"?