-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show values (sums) in venn diagram #14
Comments
Sorry, I am confused about the example. Do the numbers in 'a' and 'b' vectors mean element counts? If so, why a[2] and b[1] are not equal? Could you specify your idea more concretely? |
Thanks for getting back to me. Imagine that they are dollars in groups, but the groups overlap (I am working with custom industry classifications and want to show the output for overlapping groups). |
In the example:
Since both a[2] and b[1] are AB, why not code like this:
Could you please provide a real example to explain why AB in two vectors are different? |
Lets say that the numbers are jobs.
The venn diagram shows the intersect of counts, rather than the sum of the jobs. Does that make sense? Looking at the code in your package, you have a |
Thanks for the code! I understand now. There are two ways to use ggvenn. One is using In the former case (
Its result is exact the same as:
For the same reason, duplicated elements will be removed before plotting:
The output plot is the same. In your example above, all zeros will be merged as one element before plotting. I guess treating numeric vectors as counts may lead to more confusion. I am not sure if an explicit argument (such as 'number_as_count') could help or not. In the latter case (input as 'data.frame'), ggvenn so far picks up only logical columns for plotting. Your suggestion of treating numeric values as counts (and counting sum) is more intuitive and indeed a good idea, something like (using 'df' directly, rather than constructing another list 'x'):
How do you think? |
Thanks for the explanation. It could be an option like you have mentioned. With the data, it would be something like this:
Edit: Actually this won't work as it is set difference and duplicates don't count. |
It would be good to be able to show values.
Something like this (not sure if I am representing this correctly):
The text was updated successfully, but these errors were encountered: