[R] Real frequencies in a 'set' problem
David Winsemius
dwinsemius at comcast.net
Thu Nov 14 00:09:05 CET 2013
On Nov 13, 2013, at 1:35 PM, Stefan Petersson wrote:
> I have three media channels where I can push public health information (tv,
> radio and newspaper). Any given citizen can be touched by the information
> from one, two or three channels (let's ignore for the moment that citizens
> might miss the information all together). Hence these sets:
>
> library(sets)
>
> tv <- set(1, 4, 7, 6)
> radio <- set(6, 7, 5, 2)
> newspaper <- set(4, 7, 5, 3)
>
> Now I want to know how many citizens that newspapers bring to the complete
> body of informed citizens. E.g. how many people gets the information ONLY
> from a newspaper:
>
> (tv | radio | t) - (tv | radio)
>
> But how do I solve this if I know that
>
> 220 people is reached via tv
> 349 people is reached vi radio
> 384 people is reached via newspaper
>
> 97 people is reached via tv and radio
> 173 people is reached via radio and newspaper
> 134 people is reached via newspaper and tv
>
> It's the grey area of the (dummy) plot below that I would like to put a
> frequency in
>
> library(VennDiagram)
>
> draw.triple.venn(area1 = 10,
> area2 = 10,
> area3 = 10,
> n12 = 3,
> n13 = 3,
> n23 = 3,
> n123 = 1,
> category = c('TV', 'Radio', 'Newspaper'),
> fill = c('white', 'white', 'grey'),
> alpha = c(1, 1, 0)
> )
>
> I don't understand how the frequencies that I know is supposed to be used
> in the 'sets' notation. Or am I completely misunderstanding something here?
> Wouldn't be the first time if I did...
>
Is there any reason for us to think this isn't homework? Have you read the Posting Guide?
> TIA
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list