Open bimbam23 opened 5 years ago
I found the problem... if one of the list elements is a factor than it's misbehaving. If you convert into character it works fine. You might want to check for that?
Might I suggest renaming your issue something like: "fromList()
fails silently when supplied with factor vectors - institute a type check?," to make it more descriptive now you have discovered the nature of the problem?
I guess it's solved by checking if the input list contains factors or to convert all list elements to characters
Hi, I was looking into a way of converting a list into a upset bin-input-object: I found fromList and I used it quite a lot. I think it has a bug. If you want I can sent you some test data set. I compared it to: https://bioinformatics.stackexchange.com/questions/4394/preparing-data-for-upset-plot-in-r?answertab=votes#tab-top library(purrr) library(dplyr) combined <- reduce(list(data.frame(gene=c('gene1', 'gene2', 'gene3'), set1=1), data.frame(gene=c('gene3', 'gene4', 'gene5'), set2=1), data.frame(gene=c('gene1', 'gene4'), set3=1) ), full_join) combined[is.na(combined)] <- 0 combined
for the small example I found no difference. My bigger example is missing some data.
Cheers Jochen