if(requireNamespace("VennDiagram",quietly = TRUE)&
requireNamespace("ggplotify",quietly = TRUE)&
requireNamespace("cowplot",quietly = TRUE)){
x = list(Deseq2=sample(1:100,30),edgeR = sample(1:100,30),limma = sample(1:100,30))
draw_venn(x,"test")
draw_venn(x,"test",color = c("darkgreen", "darkblue", "#B2182B"))
}else{
if(!requireNamespace("VennDiagram",quietly = TRUE)) {
warning("Package 'VennDiagram' needed for this function to work.
Please install it by install.packages('VennDiagram')")
}
if(!requireNamespace("ggplotify",quietly = TRUE)) {
warning("Package 'ggplotify' needed for this function to work.
Please install it by install.packages('ggplotify')")
}
if(!requireNamespace("cowplot",quietly = TRUE)) {
warning("Package 'cowplot' needed for this function to work.
Please install it by install.packages('cowplot')")
}
}
Run the code above in your browser using DataLab