Thank you so much for your help :)
Actually I obtained 49 enriched gene sets using GOstats R. Plus, I have annotated gene lists of each 49 data sets. Here, I'd like to figuring out 1) how each category share same genes together and/or 2) which genes are annotated on different categories among total 49 sets. GO datasets are displayed with GOBP ID and genes are expressed with ENTREZ ID.
GO.0071779 GO.0006091 GO.0031570 GO.0051179
1 5682 32 4436 32
2 5684 226 5682 92
3 5693 498 5684 116
4 5700 506 5693 161
5 5705 2026 5700 226
6 5706 2271 5705 372
Following your recommendations, I have plotted different heatmaps using function heatmap and image. But.. these gave me a little different format what I expected before (figure from published paper I'd attached earlier). But, I'm trying to make one..