r - UpSetR dataframe as input counts zeros
问题描述
I want to use upSetR to plot some patient's characteristics. each feature is 0 or 1. They are multiplied by an ID to feed the upset function. It counts zeros and consider zero as a patient. I tried to use the following but no luck:
upSetList = list(A = df$col_1 , B = df$col_2)
解决方案
您可能需要像这样转换为向量:
upSetList = list(A = as.vector(df$col_1) , B = as.vector(df$col_2))