use_varsR Documentation

Initializing Variables

Description

This is a convenient way to initialize variables and assign them in the given environment.

Usage

use_vars(..., .env = parent.frame(), .quiet = FALSE)

Arguments

...

All the arguments will be quoted and parsed, if a argument is named, the name will be used as the name of variable to assign, otherwise the argument can only be a symbol.

.env

Environment to assign.

.quiet

Whether to supress the message.

Value

Invisibly returns a list of assigned variables.

Examples

use_vars(x, y, expr = "a + b", p = 3.14)
p * x + y
expand(expr^2L)
rm(x, y, expr, p)