where: Find where a name is defined.

View source: R/where.r

whereR Documentation

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 documentation built on Jan. 18, 2023, 1:08 a.m.

Related to where in pryr...