Krissey
2015-Aug-13 07:57 UTC
[R] How to obtain the unique communities when plotting VENNs?
Hey there guys. I am having a question about Venn diagrams. A colleague wrote a script based on the VennDiagram package a while ago, that I was able to adapt for my data. I wanted a Venn for the soil bacterial communities derived from forests of 4 different tree species. It worked fine for me, however my question is: Is there a possibility to somehow obtain a list of the unique populations of each of the for categories? <http://r.789695.n4.nabble.com/file/n4711056/Venntrees.png> That's what the Venn looks like. Now I'd like to now the 426 community members, that seem to be unique for beech forest, the 45 for pine, ect ect. I feel like this is a tough call because of all the intersecting that had to be done before. These are the Intersects: N12 = InterSect(AKL_beech,AKL_oak)#(1,2) N13 = InterSect(AKL_beech, AKL_pine)#(1,3) N14 = InterSect(AKL_beech, AKL_spruce)#(1,4) N23 = InterSect(AKL_oak,AKL_pine)#(2,3) N24 = InterSect(AKL_oak,AKL_spruce)#(2,4) N34 = InterSect(AKL_pine,AKL_spruce)#(3,4) length(N234) - length(N1234) N1234 = InterSect(N12,N34) N123 = InterSect(N12,AKL_pine) length(N123) - length(N1234) N124 = InterSect(N12,AKL_spruce) length(N124) - length(N1234) N134 = InterSect(N13,AKL_spruce) length(N134) - length(N1234) N234 = InterSect(N23,AKL_spruce) Does anyone has an idea how to do it? I'm completely at loss by now, since I am also not a pro concerning R, or statistics. I'd be happy to hear what you come up with. Thanks so much in advance! Best, Krissey -- View this message in context: http://r.789695.n4.nabble.com/How-to-obtain-the-unique-communities-when-plotting-VENNs-tp4711056.html Sent from the R help mailing list archive at Nabble.com.
John Kane
2015-Aug-13 14:06 UTC
[R] How to obtain the unique communities when plotting VENNs?
Hi Krissey, I don't have an answer for you but here are some hints on how to ask questions on R-help. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and http://adv-r.had.co.nz/Reproducibility.html In particular we probably need your actual code and some sample data. Use dput() see ?dput or read about it in the above links. John Kane Kingston ON Canada> -----Original Message----- > From: kristin.kaiser at web.de > Sent: Thu, 13 Aug 2015 00:57:57 -0700 (PDT) > To: r-help at r-project.org > Subject: [R] How to obtain the unique communities when plotting VENNs? > > Hey there guys. > > I am having a question about Venn diagrams. > A colleague wrote a script based on the VennDiagram package a while ago, > that I was able to adapt for my data. I wanted a Venn for the soil > bacterial > communities derived from forests of 4 different tree species. > It worked fine for me, however my question is: > > Is there a possibility to somehow obtain a list of the unique populations > of > each of the for categories? > <http://r.789695.n4.nabble.com/file/n4711056/Venntrees.png> > > That's what the Venn looks like. Now I'd like to now the 426 community > members, that seem to be unique for beech forest, the 45 for pine, ect > ect. > I feel like this is a tough call because of all the intersecting that had > to > be done before. These are the Intersects: > N12 = InterSect(AKL_beech,AKL_oak)#(1,2) > N13 = InterSect(AKL_beech, AKL_pine)#(1,3) > N14 = InterSect(AKL_beech, AKL_spruce)#(1,4) > N23 = InterSect(AKL_oak,AKL_pine)#(2,3) > N24 = InterSect(AKL_oak,AKL_spruce)#(2,4) > N34 = InterSect(AKL_pine,AKL_spruce)#(3,4) > length(N234) - length(N1234) > N1234 = InterSect(N12,N34) > N123 = InterSect(N12,AKL_pine) > length(N123) - length(N1234) > N124 = InterSect(N12,AKL_spruce) > length(N124) - length(N1234) > N134 = InterSect(N13,AKL_spruce) > length(N134) - length(N1234) > N234 = InterSect(N23,AKL_spruce) > > Does anyone has an idea how to do it? I'm completely at loss by now, > since I > am also not a pro concerning R, or statistics. > I'd be happy to hear what you come up with. > Thanks so much in advance! > > Best, Krissey > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/How-to-obtain-the-unique-communities-when-plotting-VENNs-tp4711056.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Krissey
2015-Aug-13 15:05 UTC
[R] How to obtain the unique communities when plotting VENNs?
Thanks a lot John - I will set up a new post and hopefully do better :) -- View this message in context: http://r.789695.n4.nabble.com/How-to-obtain-the-unique-communities-when-plotting-VENNs-tp4711056p4711081.html Sent from the R help mailing list archive at Nabble.com.