glue_do {glueDo} | R Documentation |
Glue Wrapper Functions
Description
These functions are used to pass a glue string to a function and execute it.
Usage
glue_do(.x, ..., .envir = parent.frame(), .func)
glue_func(.x, .func, ..., .envir = parent.frame())
glue_stop(.x, ..., .envir = parent.frame(), .func = stop)
glue_print(.x, ..., .envir = parent.frame(), .func = print)
glue_message(.x, ..., .envir = parent.frame(), .func = message)
glue_warning(.x, ..., .envir = parent.frame(), .func = warning)
glue_cat(.x, ..., .envir = parent.frame(), .func = cat)
glue_return(.x, ..., .envir = parent.frame(), .func = identity)
glue_write(.x, file, ..., .envir = parent.frame(), .func = writeLines)
Arguments
.x |
The glue string containing expressions to be evaluated. |
... |
Additional arguments passed to 'glue'. |
.envir |
The environment where the expressions in the glue string are evaluated. Defaults to 'parent.frame()'. |
.func |
A function to execute with the result of the evaluated glue string. |
file |
file file |
Value
Returns the result of executing '.func' with the evaluated glue string.
Functions
-
glue_func()
: Executes a custom function with the evaluated glue string. -
glue_stop()
: Executes the 'stop' function with the evaluated glue string. -
glue_print()
: Executes the 'print' function with the evaluated glue string. -
glue_message()
: Executes the 'message' function with the evaluated glue string. -
glue_warning()
: Executes the 'warning' function with the evaluated glue string. -
glue_cat()
: Executes the 'cat' function with the evaluated glue string. -
glue_return()
: Evaluates the glue string and returns the result. -
glue_write()
: Initializes a file connection and writes the evaluated glue string to it.
Examples
world <- 'mars'
glue_message('HELLO {world}!')