Learn R Programming

qdap (version 1.3.5)

is.global: Test If Environment is Global

Description

A logical test to determine if the current environment is the global environment.

Usage

is.global(n = 1)

Arguments

n
The number of generations to go back. If used as a function argument n should be set to 2.

Value

  • A logical response.

References

http://stackoverflow.com/questions/18637656/detect-if-environment-is-global-enviroment

See Also

globalenv, parent.frame

Examples

Run this code
is.global()
lapply(1:3, function(i) is.global())
FUN <- function() is.global(); FUN()

Run the code above in your browser using DataLab