purrr 0.2.5

This is a maintenance release following the release of dplyr 0.7.5.

purrr 0.2.4

purrr 0.2.3

Breaking changes

We noticed the following issues during reverse dependencies checks:

Dependencies

purrr no longer depends on lazyeval or Rcpp (or dplyr, as of the previous version). This makes the dependency graph of the tidyverse simpler, and makes purrr more suitable as a dependency of lower-level packages.

There have also been two changes to eliminate name conflicts between purrr and dplyr:

pluck()

The plucking mechanism used for indexing into data structures with map() has been extracted into the function pluck(). Plucking is often more readable to extract an element buried in a deep data structure. Compare this syntax-heavy extraction which reads non-linearly:

accessor(x[[1]])$foo

to the equivalent pluck:

x %>% pluck(1, accessor, "foo")

Map helpers

as_mapper() sanitises primitive functions by transforming them to closures with standardised argument names (using rlang::as_closure()). For instance + is transformed to function(.x, .y) .x + .y. This results in proper argument matching so that map(1:10, partial(-, .x = 5)) produces list(5 - 1, 5 - 2, ...).

Map functions

Modify functions

A new modify() family returns the same output of the type as the input .x. This is in contrast to the map() family which always returns a list, regardless of the input type.

The modify functions are S3 generics. However their default methods should be sufficient for most classes since they rely on the semantics of [<-. modify.default() is thus a shorthand for x[] <- map(x, f).

New functions

Minor improvements and bug fixes

purrr 0.2.2.1

This is a compatibility release with dplyr 0.6.0.

purrr 0.2.2

purrr 0.2.1

purrr 0.2.0

New functions

Row based functionals

We are still figuring out what belongs in dplyr and what belongs in purrr. Expect much experimentation and many changes with these functions.

Bug fixes and minor changes

Deprecated functions