[R] how to draw crossing circles to show relationship?

S Ellison S.Ellison at LGCGroup.com
Fri Feb 24 11:49:16 CET 2012

Try RSiteSearch("Venn diagram")


> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Guang Dai
> Sent: 23 February 2012 22:30
> To: r-help at r-project.org
> Subject: [R] how to draw crossing circles to show relationship?
> Dear list,
> To make it easier, let me start with an example. 
> Say I have 20 different cookies. Dave likes 7 of them, Evan likes
> 14 of them and Torri likes 11 of them. The data is
> cookies<-cbind(c(1:20), c(1,0,0,1,0,1,0,0,0,0,1,1,1,0,0,0,1,0,0,0),
> c(1,1,1,0,0,1,1,1,1,1,0,1,1,0,1,0,1,0,1,1),
> c(1,1,0,1,0,0,1,0,1,1,0,0,1,0,1,0,1,1,1,0))
> colnames(cookies)<-c("cookie","Dave","Evan","Torri")
> Obviously, cookie 1,13 and 17 are liked by all of the person. 
> cookie 2,7,9,10,13,15,17 and 19 are liked by Evan and Torri, etc. 
> I want a chart by using  crossing circles to show how many is 
> liked to all of them, how many is like by Dave and Evan,..., 
> and how many is like only by Dave,.... Just like the Olympic 
> log but with numbers to show the relationship. Of course, 
> each circle represents one person in our data.
> Better if we can draw the circles according to the total 
> cookies liked by its corresponding person. 
> I'm very new to R and have no idea how to do it. Thanks for 
> any advices. 
> regards,
> Guang
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
> *******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

More information about the R-help mailing list