Skip to content

Update tidy eval reexport file #3308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ matrix:
provider: script
script: Rscript -e 'pkgdown::deploy_site_github(verbose = TRUE)'
skip_cleanup: true
- r: oldrel
- r: 3.5
- r: 3.4
- r: 3.3
- r: 3.2
env: R_REMOTES_NO_ERRORS_FROM_WARNINGS=true
- r: 3.1
env: R_REMOTES_NO_ERRORS_FROM_WARNINGS=true

# environment variables set for all builds
env:
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Authors@R: c(
person("RStudio", role = c("cph"))
)
Depends:
R (>= 3.1)
R (>= 3.2)
Imports:
digest,
grDevices,
Expand All @@ -27,7 +27,7 @@ Imports:
MASS,
mgcv,
reshape2,
rlang (>= 0.3.0),
rlang (>= 0.3.1),
scales (>= 0.5.0),
stats,
tibble,
Expand Down
12 changes: 12 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ S3method(widthDetails,titleGrob)
S3method(widthDetails,zeroGrob)
export("%+%")
export("%+replace%")
export(":=")
export(.data)
export(.pt)
export(.stroke)
Expand Down Expand Up @@ -237,7 +238,9 @@ export(annotation_logticks)
export(annotation_map)
export(annotation_raster)
export(arrow)
export(as_label)
export(as_labeller)
export(as_name)
export(autolayer)
export(autoplot)
export(benchplot)
Expand Down Expand Up @@ -579,6 +582,15 @@ import(gtable)
import(rlang)
import(scales)
importFrom(lazyeval,f_eval)
importFrom(rlang,":=")
importFrom(rlang,.data)
importFrom(rlang,as_label)
importFrom(rlang,as_name)
importFrom(rlang,enquo)
importFrom(rlang,enquos)
importFrom(rlang,expr)
importFrom(rlang,sym)
importFrom(rlang,syms)
importFrom(stats,setNames)
importFrom(tibble,tibble)
importFrom(utils,.DollarNames)
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ extension developers if they have relied on internals that have been changed.
This release also sees the addition of Hiroaki Yutani (@yutannihilation) to the
core developer team.

With the release of R 3.6, ggplot2 now requires the R version to be at least 3.2,
as the tidyverse is committed to support 5 major versions of R.

## New features

* This release includes a range of internal changes that speeds up plot
Expand Down
63 changes: 44 additions & 19 deletions R/utilities-tidy-eval.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,55 @@
#' \code{\link[rlang]{syms}()} creates a list of symbols from a
#' character vector.
#'
#' * \code{\link[rlang]{expr}()} and \code{\link[rlang]{quo}()} quote
#' one expression. `quo()` wraps the quoted expression in a quosure.
#' * \code{\link[rlang]{enquo}()} and \code{\link[rlang]{enquos}()}
#' delay the execution of one or several function arguments.
#' \code{enquo()} returns a single quoted expression, which is like
#' a blueprint for the delayed computation. \code{enquos()} returns
#' a list of such quoted expressions.
#'
#' The plural variants \code{\link[rlang]{exprs}()} and
#' \code{\link[rlang]{quos}()} return a list of quoted expressions or
#' quosures.
#' * \code{\link[rlang]{expr}()} quotes a new expression _locally_. It
#' is mostly useful to build new expressions around arguments
#' captured with [enquo()] or [enquos()]:
#' \code{expr(mean(!!enquo(arg), na.rm = TRUE))}.
#'
#' * \code{\link[rlang]{enexpr}()} and \code{\link[rlang]{enquo}()}
#' capture the expression supplied as argument by the user of the
#' current function (`enquo()` wraps this expression in a quosure).
#' * \code{\link[rlang]{as_name}()} transforms a quoted variable name
#' into a string. Supplying something else than a quoted variable
#' name is an error.
#'
#' \code{\link[rlang]{enexprs}()} and \code{\link[rlang]{enquos}()}
#' capture multiple expressions supplied as arguments, including
#' `...`.
#' That's unlike \code{\link[rlang]{as_label}()} which also returns
#' a single string but supports any kind of R object as input,
#' including quoted function calls and vectors. Its purpose is to
#' summarise that object into a single label. That label is often
#' suitable as a default name.
#'
#' If you don't know what a quoted expression contains (for instance
#' expressions captured with \code{enquo()} could be a variable
#' name, a call to a function, or an unquoted constant), then use
#' \code{as_label()}. If you know you have quoted a simple variable
#' name, or would like to enforce this, use \code{as_name()}.
#'
#' To learn more about tidy eval and how to use these tools, visit
#' \url{http://tidyeval.tidyverse.org} and the
#' \href{https://adv-r.hadley.nz/metaprogramming.html}{Metaprogramming
#' section} of \href{https://adv-r.hadley.nz}{Advanced R}.
#'
#' @md
#' @name tidyeval
#' @keywords internal
#' @aliases quo quos enquo enquos quo_name
#' sym ensym syms ensyms
#' expr exprs enexpr enexprs
#' .data
#' @export quo quos enquo enquos quo_name
#' @export sym ensym syms ensyms
#' @export expr enexpr enexprs
#' @export .data
#' @importFrom rlang expr enquo enquos sym syms .data := as_name as_label
#' @aliases expr enquo enquos sym syms .data := as_name as_label
#' @export expr enquo enquos sym syms .data := as_name as_label
NULL


#' Other tidy eval tools
#'
#' These tidy eval tools are no longer recommended for normal usage,
#' but are still exported for compatibility. See [`?tidyeval`][tidyeval]
#' for the recommended tools.
#'
#' @keywords internal
#' @name tidyeval-compat
#' @aliases quo quos quo_name ensym ensyms enexpr enexprs
#' @export quo quos quo_name ensym ensyms enexpr enexprs
NULL
18 changes: 18 additions & 0 deletions man/tidyeval-compat.Rd

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

51 changes: 31 additions & 20 deletions man/tidyeval.Rd

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