Skip to content

Complete/expand with additional combinations #121

@danielsjf

Description

@danielsjf

Is it possible to implement a way to include permutations using more than just the options provided in the data frame?

Now it works like this:

> data.frame(a=c(1,2),b=c(3,4)) %>%
    expand(a,b)
Source: local data frame [4 x 2]
      a     b
  (dbl) (dbl)
1     1     3
2     1     4
3     2     3
4     2     4

But it would be nice to have something like this:

> data.frame(a=c(1,2),b=c(3,4)) %>%
    expand(a,b=c(3:5))
Source: local data frame [6 x 2]
      a     b
  (dbl) (dbl)
1     1     3
2     1     4
3     1     5
4     2     3
5     2     4
6     2     5

The exact same problem holds for complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions