Hey there!
I have a dataframe that consists of 5 integer vectors, with one column representing IDs, and the other 4 vectors that are categorical survey response answers (0= no, 1=yes). The survey questions ask if there is the presence of a variable of interest, with individual questions about each specific subtype (i.e. Column 1 - yes I have this variable of Y variety, Column 2 - Yes I have this variable of Z variety).
Ideally, I would like to create a factor vector, which includes all of the yes responses, with their specific subtype/variety detailed with a labelled level. The end result I am aiming for is the ability to plot a single factor as a bar plot showing all the positive results with a breakdown by the type of subtype.
If there might be any guidance on how to collapse the column categorical vectors into a single factor vector, please let me know and thanks so much!!