Closed larry1995 closed 3 years ago
Hi, @larry1995
Thank you for your interest in ggvenn!
Yes, ggvenn processes list
and data.frame
input data in different ways. So far, there is no easy way to convert between them. Maybe it is a good idea to provide such functions in ggvenn.
Would you please try like this:
library(tidyverse)
library(ggvenn)
a <- list(CEH = c("AT1G01010", "AT1G01060"),
EDSCEH = c("AT1G01060", "AT1G01110", "AT1G01340"),
CEHEDSvsCEH = c("AT1G02230", "AT1G13620")) # for demo
d <- tibble(name = unique(unlist(a)))
for (name in names(x)) d[, name] <- d$name %in% x[[name]]
ggvenn(d)
Hi @yanlinlin82 ,
Awesome. It works for me. I really appreciate your help.
Two functions list_to_data_frame()
and data_frame_to_list()
were added into ggvenn
(9156936).
Hi Yan,
I am using your ggvenn for my own data analysis. However, I can't convert my dataset from the list “a" to dataframe "d" as you showed on your GitHub. Could you tell me how to convert this list to the tibble?