Learn R Programming

debug (version 1.0.1)

find.from: Interactive debugging

Description

find.from( x, y) returns the environment where x would be found if Rwas 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 n
look.for.generics
logical used internally in recursion; don't change this.

Value

  • either FALSE (if not found) or an environment.

Details

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

Examples

Run this code
find.from( "as.matrix.data.frame") # NULL; implies "package:base"}
<keyword>debugging</keyword>

Run the code above in your browser using DataLab