Skip to content

Combinatoric generators should accept a single integer #42

@ramhiser

Description

@ramhiser

Similar to utils::combn, iff a single integer is passed to icombinations or ipermutations, the iterator should return the combinations/permutations of the sequence. For example, the following should be equivalent:

  • icombinations(5, 2)
  • icombinations(1:5, 2)

Currently, as.list(icombinations(5, 2)) returns list().

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