Learn R Programming

reproducible (version 1.2.8)

isTopLevelEnv: Determine if an environment is a top level environment

Description

Here, we define that as .GlobalEnv, any namespace, emptyenv, or baseenv. This is useful to determine the effective size of an R function, due to R including the objects from enclosing environments

Usage

isTopLevelEnv(x)

Value

A logical. FALSE if it is not one of the "Top Level Environments", TRUE otherwise.

Arguments

x

Any environment