Skip to content

Integrate with magrittr #43

@ramhiser

Description

@ramhiser

Iterators and itertools2 will be more flexible and useful if they can be used with magrittr pipes (and ultimately with dplyr). It turns out that pipes do, in fact, work in some cases.

Example (related to #41):

as_vector <- function(x) {
  unlist(as.list(x))
}

set.seed(42)
irep(function(x) rnorm(1), times=10) %>% as_vector
# [1]  1.37095845 -0.56469817  0.36312841  0.63286260  0.40426832 -0.10612452  1.51152200 -0.09465904
# [9]  2.01842371 -0.06271410

Next Steps

  • Construct lots of use cases where pipes are used.
  • Lots of unit tests based on these examples.

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