Skip to content

Commit

Permalink
export the %>% pipe from magrittr
Browse files Browse the repository at this point in the history
closes #107
  • Loading branch information
sfirke committed Apr 12, 2017
1 parent 1b8b6cc commit 28fafcb
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Depends:
R (>= 3.1.2)
Imports:
dplyr (>= 0.5.0),
tidyr
tidyr,
magrittr
License: MIT + file LICENSE
LazyData: true
RoxygenNote: 6.0.1
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ S3method(crosstab,data.frame)
S3method(crosstab,default)
S3method(tabyl,data.frame)
S3method(tabyl,default)
export("%>%")
export(add_totals_col)
export(add_totals_row)
export(adorn_crosstab)
Expand All @@ -20,4 +21,5 @@ export(tabyl)
export(top_levels)
export(use_first_valid_of)
importFrom(dplyr,"%>%")
importFrom(magrittr,"%>%")
importFrom(stats,setNames)
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ NEWS

### Major

#### Deprecated the following functions:
* Exported the `%>%` pipe from magrittr [(#107)](https://github.com/sfirke/janitor/issues/107).

**Deprecated the following functions:**
* `use_first_valid_of()` - use `dplyr::coalesce()` instead
* `convert_to_NA()` - use `dplyr::na_if()` instead
* `add_totals_row()` and `add_totals_col()` - replaced by the single function `adorn_totals()`
Expand Down
13 changes: 13 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copied from tidyr/R/utils.R, to export the magrittr pipe

#' Pipe operator
#'
#' See \code{\link[magrittr]{\%>\%}} for more details.
#'
#' @name %>%
#' @rdname pipe
#' @keywords internal
#' @export
#' @importFrom magrittr %>%
#' @usage lhs \%>\% rhs
NULL
12 changes: 12 additions & 0 deletions man/pipe.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 28fafcb

Please sign in to comment.