Permalink
Browse files

Deprecate %.%. Closes #518.

chain() is now defunct
  • Loading branch information...
hadley committed Aug 1, 2014
1 parent d98337a commit 67183e2771f24f59330fdaae1bb58b627a58a8ff
Showing with 8 additions and 3 deletions.
  1. +3 −0 NEWS.md
  2. +5 −3 R/chain.r
View
@@ -1,5 +1,8 @@
# dplyr 0.2.0.99
+* `%.%` has been deprecated: please use `%>%` instead. `chain()` is
+ defunct. (#518)
+
* `group_by()` has more consistent behaviour when grouping by constants:
it creates a new column with that value (#410).
View
@@ -62,9 +62,8 @@
#' ) %>%
#' filter(arr > 30 | dep > 30)
chain <- function(..., env = parent.frame()) {
- # Deprecated 0.2. Remove in 0.3
- warning("Chain is deprecated. Please use %>%", call. = FALSE)
- chain_q(dots(...), env = env)
+ # Defunct 0.3. Remove in 0.4
+ stop("Chain is defunct Please use %>%", call. = FALSE)
}
#' @export
@@ -90,6 +89,9 @@ chain_q <- function(calls, env = parent.frame()) {
#' @export
#' @rdname chain
"%.%" <- function(lhs, rhs) {
+ # Deprecated 0.3. Defunct in 0.4
+ warning("%.% is deprecated. Please use %>%", call. = FALSE)
+
chain_q(list(substitute(lhs), substitute(rhs)), env = parent.frame())
}

0 comments on commit 67183e2

Please sign in to comment.