find.from {debug}R Documentation

Interactive debugging

Description

find.from( x, y) returns the environment where x would be found if R was trying to find object x within environment y.

Usage

find.from( char.fname, from=mvb.sys.parent(), look.for.generics=TRUE)

Arguments

char.fname length 1 character vector giving the name of the object that's being looked for.
from an environment, function, or number, showing where to start the search from. Defaults to the calling environment (or .GlobalEnv). If from is a function, its environment is used as the starting point for the search. If from is a number, sys.frames()[[ from]] is used.
look.for.generics logical used internally in recursion; don't change this.

Details

Used by mtrace. Doesn't attempt to deal with S4 methods. Doesn't have a mode argument (unlike find).

Value

either FALSE (if not found) or an environment.

Examples

find.from( "as.matrix.data.frame") # NULL; implies "package:base"

[Package Contents]