% Generated by roxygen2 (4.0.2): do not edit by hand
\name{is.global}
\alias{is.global}
\title{Test If Environment is Global}
\usage{
is.global(n = 1)
}
\arguments{
\item{n}{The number of generations to go back.  If used as a function
argument n should be set to 2.}
}
\value{
A logical response.
}
\description{
A logical test to determine if the current environment is the global
environment.
}
\examples{
is.global()
lapply(1:3, function(i) is.global())
FUN <- function() is.global(); FUN()

FUN2 <- function(x = is.global(2)) x
FUN2()
FUN3 <- function() FUN2(); FUN3()
}
\author{
Simon O'Hanlon and Tyler Rinker <tyler.rinker@gmail.com>
}
\references{
\url{http://stackoverflow.com/questions/18637656/detect-if-environment-is-global-enviroment}
}
\seealso{
\code{\link[base]{globalenv}},
\code{\link[base]{parent.frame}}
}

