Learn R Programming

mmrm (version 0.3.16)

h_generate_new_name: Generate a Name Not Already In an Environment nor Its Parents

Description

Alters the user-supplied string x using make.names() with unique = TRUE until it is a syntactically valid name not bound to in env nor its parents.

Usage

h_generate_new_name(x, env)

Value

A string that does not match any of the bindings of env nor its parents.

Arguments

x

(string)
a candidate name.

env

(environment)
an environment whose bindings (and whose parents' bindings) are checked to ensure that they do not include the returned value.