Skip to content

Commit

Permalink
Use !! in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Jan 4, 2017
1 parent 8b1824b commit 62e6c2b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions R/arg.R
Expand Up @@ -319,8 +319,8 @@ fml_default <- function(expr, fn) {
#' @export
#' @examples
#' # The missing argument can be useful to generate calls
#' interp(~f(x = UQ(arg_missing())))
#' interp(~f(x = UQ(NULL)))
#' interp(~f(x = !! arg_missing()))
#' interp(~f(x = !! NULL))
#'
#'
#' # It is perfectly valid to generate and assign the missing
Expand Down
4 changes: 2 additions & 2 deletions R/f-eval.R
Expand Up @@ -68,10 +68,10 @@ f_eval_lhs <- function(f, data = NULL) {
#' # Imagine you are computing the mean of a variable:
#' f_eval(~ mean(cyl), mtcars)
#' # How can you change the variable that's being computed?
#' # The easiest way is "unquote" with UQ()
#' # The easiest way is "unquote" with !!
#' # See ?interp for more details
#' var <- ~ cyl
#' f_eval(~ mean( UQ(var) ), mtcars)
#' f_eval(~ mean( !!var ), mtcars)
f_eval <- f_eval_rhs


Expand Down
4 changes: 2 additions & 2 deletions man/arg_missing.Rd

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

4 changes: 2 additions & 2 deletions man/f_eval.Rd

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

0 comments on commit 62e6c2b

Please sign in to comment.