Releases: r-lib/zeallot
zeallot 0.2.0 (drifting by)
Breaking changes
-
The collector syntax has changed. The previous syntax
...
was incompatible
withR CMD check
and would raise the error "... may be used in an incorrect
context". The new syntax..
(double dots instead of triple) avoids this
error. (#62)# new c(x, ..) %<-% list(1, 2, 3) # old c(x, ...) %<-% list(1, 2, 3)
-
The
destructure
methods for the Date, character, and complex classes have
been removed.
New features
-
Values may now be assigned by name. The new syntax allows assigning a
value to a variable by name instead of position. (#47)c(disp=, gear=) %<-% mtcars
-
For package developers, the new function
zeallous()
will prevent
R CMD check
from raising visible binding errors for variables assigned using
%<-%
. Call the function from a package's.onLoad
function. (#57).onLoad <- function(libname, pkgname) { zeallous() }
Major improvements
-
Collector variables now default to an empty list instead of raising an error
when there are no values to collect. (#56)c(x, ..y) %<-% list(1)
-
Trailing anonymous collectors and value skips no longer raise errors.
c(x, ..) %<-% list(1) c(y, .) %<-% list(1)
Minor improvements
-
Error messages have been simplified.
-
R versions >= 3.2 are formally supported.
winning duende
left-hand side of darkness
to the right, to the right
summary
-
The bracket and colon syntax has been completely removed, users will now see
an "unexpected call {" error message when attempting to use the old syntax.
Please use thec()
name structure syntax. -
A
%->%
operator has been added. The right operator performs the same
operation as%<-%
with the name structure on the right-hand side and
the values to assign on the left-hand side. This is particularly useful as
the left operator did not work well with%>%
chains. -
=
may be used to specify the default value of a variable. A default value
is used when there are an insufficient number of values.
simpler, lighter, stronger
summary
- The bracket and colon syntax has been deprecated in favor of a lighter syntax.
Documentation has been updated accordingly, see docs for more
information about the new syntax. Using the old syntax will raise a warning
and will be removed in future versions of zeallot. Thank you to @hadley for
the suggestion. (#21) %<-%
can now be used for regular assignment. (#17)...
can now be used to skip multiple values without assigning those values
and is now recommended over the previously suggested....
. (#18)massign()
is no longer exported.
syntax
c(a, b) %<-% c(0, 1)
c(a, b) %<-% list(0, 1)
c(a, c(b, d)) %<-% list(0, list(1, 2))
c(a, c(b, d)) %<-% data.frame(x = 1:5, y = 6:10, z = 11:15)
bug fixes
vector to shining vector
summary
- documentation and examples now consistently put space around colons, e.g.
a : b
instead ofa: b
- additional minor updates to the README and man pages
bug fixes
- when unpacking a vector of values collector variables now collect values as a vector, previously values were collected as a list (#14)
initial CRAN release
summary
- all functionality is the same as v0.0.1
- cleaned up README.md, NEWS.md, fixed .Rbuildignore
- submitted to CRAN
initial release
summary
- not on CRAN
%<-%
operator- name syntax using
:
and{
syntax
a: b %<-% c(0, 1)
{a: b} %<-% list(0, 1)
{a: {b: c}} %<-% list(0, list(1, 2))
{a: b: c} %<-% data.frame(x = 1:5, y = 6:10, z = 11:15)
vignettes
- introduction to unpacking assignment