Skip to content

Commit

Permalink
Removed examples that can't run outside the package
Browse files Browse the repository at this point in the history
I had examples that called an internal function. That doesn't go through CHECK. Fixed that now.
  • Loading branch information
mailund committed Feb 9, 2018
1 parent 74e1945 commit 20502b0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
13 changes: 0 additions & 13 deletions R/user-defined-transformations.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,6 @@ transform_call.default <- function(fun, expr) {
#' @param env The environment where functions can be found.
#'
#' @return Rewritten expression
#'
#' @examples
#' my_if_else <- function(test, if_true, if_false) {
#' if (test) if_true else if_false
#' }
#' class(my_if_else) <- c("my_if_else", class(my_if_else))
#' transform_call.my_if_else <- function(fun, expr) {
#' test <- expr[[2]]; if_true <- expr[[3]]; if_false <- expr[[4]]
#' rlang::expr(if (rlang::UQ(test)) rlang::UQ(if_true) else rlang::UQ(if_false))
#' }
#'
#' f <- function(x, y) my_if_else(x == y, x, f(y, y))
#' user_transform_rec(body(f))
user_transform_rec <- function(expr, env = rlang::caller_env()) {
if (rlang::is_atomic(expr) || rlang::is_pairlist(expr) ||
rlang::is_symbol(expr) || rlang::is_primitive(expr)) {
Expand Down
13 changes: 0 additions & 13 deletions man/user_transform_rec.Rd

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

0 comments on commit 20502b0

Please sign in to comment.