Debian Codegraph @

man/peek_vars.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/vars.R
3 \name{peek_vars}
4 \alias{peek_vars}
5 \alias{peek_data}
6 \title{Peek at variables in the selection context}
7 \usage{
8 peek_vars(..., fn = NULL)
9
10 peek_data(..., fn = NULL)
11 }
12 \arguments{
13 \item{...}{These dots are for future extensions and must be empty.}
14
15 \item{fn}{The name of the function to use in error messages when
16 the helper is used in the wrong context. If not supplied, a
17 generic error message is used instead.}
18 }
19 \description{
20 \itemize{
21 \item \code{peek_vars()} returns the vector of names of the variables
22 currently available for selection.
23 \item \code{peek_data()} returns the whole input vector (only available with
24 \code{\link[=eval_select]{eval_select()}}).
25 }
26
27 Read the \href{https://tidyselect.r-lib.org/articles/tidyselect.html}{Get started} for
28 examples of how to create selection helpers with \code{peek_vars()}.
29
30 The variable names in a selection context are registered
31 automatically by \code{\link[=eval_select]{eval_select()}} and \code{\link[=eval_rename]{eval_rename()}} for the
32 duration of the evaluation. \code{peek_vars()} is the glue that connects
33 \link[=language]{selection helpers} to the current selection
34 context.
35 }