Learn R Programming

pkgcond (version 0.1.1)

find_scope: Find the default scope of a call.

Description

This find the scope of the call. It includes the package of the call, the class if called from a method, and the name of the function called.

Usage

find_scope(frame = NULL, global = FALSE)

Arguments

frame

The frame to infer scope from.

global

Should the global frame be listed in the scope.

Examples

Run this code
# NOT RUN {
my_function <- function(){
    scope <- find_scope()
    "You are in" %<<% collapse(scope, '::')
}
my_function()

my_sights <- my_function
my_sights()

# }

Run the code above in your browser using DataLab