Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

where

Find where a name is defined.


Description

Implements the regular scoping rules, but instead of returning the value associated with a name, it returns the environment in which it is located.

Usage

where(name, env = parent.frame())

Arguments

name

name, as string, to look for

env

environment to start at. Defaults to the calling environment of this function.

Examples

x <- 1
where("x")
where("t.test")
where("mean")
where("where")

pryr

Tools for Computing on the Language

v0.1.4
GPL-2
Authors
Hadley Wickham [aut, cre], R Core team [ctb] (Some code extracted from base R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.