I can see that this has been asked several times before, but I can no find a method that works. Are there any clever people out there that can figure this out?
data.frame(
fast_car = sample(0:1, 35, replace = TRUE),
slow_bus = sample(0:1, 35, replace = TRUE),
fast_bus = sample(0:1, 35, replace = TRUE),
slow_car = sample(0:1, 35, replace = TRUE)) %>%
upset(order.by = "freq")
This makes a very nice upset graph but I need to get rid of the the underscore in the set labels. I tried the answer suggested in this post: UpsetR change set name labels in graph
fast_car <- as.list(sample(0:1, 35, replace = TRUE))
slow_bus <- as.list(sample(0:1, 35, replace = TRUE))
fast_bus <- as.list(sample(0:1, 35, replace = TRUE))
slow_car <- as.list(sample(0:1, 35, replace = TRUE))
listinput = list(fast_bus, fast_car, slow_bus, slow_car)
names(listinput) = c("fast bus", "fast car", "slow_bus", "slow car")
upset(fromList(listinput), order.by = "freq")
However this results in nice labels but the graph doesn't come out correctly. I have also tried usuing a tibble with labeled columns but the package doesnt seem to work with the tibble.
Is there a way of doing this? I would just use one word but it really needs 2 word labels.
Any help would be greatly appreciated, if a solution indeed exists?
Many thanks!