Skip to contents

All named entries in the dots object will be bound to variables. Unnamed entries will be appended to any existing value of ... in the order in which they appear.

Usage

dots2env(
  x,
  env = new.env(hash = hash, parent = parent, size = size),
  names = NULL,
  use_dots = TRUE,
  append = TRUE,
  hash = (length(dots) > 100),
  size = max(29L, length(dots)),
  parent = emptyenv()
)

# S3 method for dots
as.environment(x)

Arguments

x

A dots object with names.

env

Specify an environment object to populate and return. By default a new environment is created.

names

Which variables to populate in the environment. If NULL is given, will use all names present in the dotlist. If a name is given that does not match any names from the dots object, an error is raised.

use_dots

Whether to bind unnamed or unmatched items to .... If FALSE, these items are discarded. If TRUE, they bound to ... in the environment. If items have duplicate names, the earlier ones are used and the rest placed in "...".

append

if TRUE, unmatched or unnamed items will be appended to any existing value of '...'. If FALSE, the existing binding of ... will be cleared. (Neither happens if use_dots is FALSE.)

hash

if env is NULL, this argument is passed to new.env.

size

if env is NULL, this argument is paseed to new.env.

parent

if env is NULL, this argument is paseed to new.env.

Value

An environment object.

See also

env2dots