- redesigned the API to avoid duplication, split jobs between the all powerful
transmute
, thetransform
-like but humbly-namedbind.cols
and the specialized,dplyr
-liftedselect
. magic.wand
now knows special tricks to deal with non-standard argument evaluation.data
variable intransmute
,bind.cols
andwhere
expressions allows to refer to the whole chunk of data, not just one column, for instance to select odd columns:transmute(mtcars, odd = .data[, c(T,F)])
.- new pipe operators
%|%
and%!%
:select(group(select(input(data), select2.args), group.args), select1.args)
can be written likedata %|% input %|% select(select1.args) %|% group(group.args) %|% select(select2.args)
in a unix shell like fashion.a %!% b
is a shorthand forfunction(x) x %|% a %|% b
. Works with complex expressions and piping into arguments other than the first using the special.
variable, as in:LETTERS %|% grep("A", .)
orLETTERS %|% paste0(.,.,.)
. Similar to features found in packagesvadr
,dplyr
andmagrittr
. - optimizations for nested grouping, saves a job in certain circumstances.
where
takes a single argument now. The multiple argument form just calculated a logical&
of all the arguments, which is an arbitrary default and one more thing to remember. Thereforewhere(data, cond1, cond2, cond3)
becomeswhere(data, cond1 & cond2 & cond3)
. More clear, same verbosity and symmetric towhere(data, cond1 | cond2 | cond3)
, and we all love symmetries, don't we?transmute
allows fractional recyclingtransmute(mtcars, even = c(FALSE, TRUE), triad = 1:3, .cbind = TRUE)
..columns
argument fortransmute
, allows to select multiple cols with a string character:transmute
(mtcars, .columns=c("carb", "cyl", "mpg"))`.- removed
pryr
dependency with modest borrowing of code courtesy of the always supportive @hadley - prettier default names for new columns
- better composition rules for mergeable and non-mergeable operations, information about mergeability is stored in the operation itself. Mergeability in this context is when an operation is associative and commutative, which allows an important optimization in Mapreduce.
- operations also encapsulate information about being able to deal with multiple groups at once, but this is still work in progress.
- name changes in recursive group:
mtcars %|% input %|% gather %|% select(sum(carb))
just works. - column duplication
- more aggressive freezing of environments to make delayed evaluation and pipe optimization semantically neutral
- incorrect writing to "native" format when custom expected
- uncountable corner cases (things like 0-rows, 0-columns etc), but there may be more.