TITLE(exists @@ Is a Variable Defined?)
USAGE(
exists(x, where =NULL, envir=sys.frame(sys.parent()), frame =NULL,
       mode = "any", inherits = TRUE)
)
ALIAS(exists)
ARGUMENTS(
ARG(x @@ a variable name (given as a quoted string).)
ARG(where, envir, frame @@ an environent to be searched. By default this is the
environment where the call to LANG(envir) takes place.)
ARG(mode @@ the type of interest for the object.)
ARG(inherits @@ should the enclosing frames of the environment be inspected.)
)
DESCRIPTION(
This function looks to see if the name LANG(x) has a value bound to it.
If LANG(inherits) is LANG(TRUE) and a value is not found for LANG(x),
then the parent frames of LANG(envir) are searched until the name
LANG(x) is encountered.
If LANG(mode) is specified then only objects of that mode are sought.
The function returns LANG(TRUE) if the variable is encountered and
LANG(FALSE) if not.
)
SEEALSO(
LANG(LINK(get)).
)
EXAMPLES(
##  Define a substitute function if necessary:
if(!exists("some.fun", mode="function"))
 some.fun <- function(x) { cat("some.fun(x)\n"); x }
)
