Skip to content

Feature request: include 0s in pairwise output #24

@dhalpern

Description

@dhalpern

I'm not totally sure if this is a feature or a bug but many pairwise comparisons drop 0s in the output. For instance, in the pairwise count example

dat <- data_frame(group = rep(1:5, each = 2),
                  letter = c("a", "b",
                             "a", "c",
                             "a", "c",
                             "b", "e",
                             "b", "f"))
count the number of times two letters appear together
pairwise_count(dat, letter, group, upper = FALSE)

The output only includes those with a count greater than 1

item1 item2     n
  <chr> <chr> <dbl>
1 a     b         1
2 a     c         2
3 b     e         1
4 b     f         1

It would be great to have an option to include all pairs of items. My actual use case is for having pairwise similarities of exactly 0 so it would be great to have that feature there as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions