find_scope: Find the default scope of a call.

Description Usage Arguments Examples

View source: R/find_scope.R

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

1
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

1
2
3
4
5
6
7
8
my_function <- function(){
    scope <- find_scope()
    "You are in" %<<% collapse(scope, '::')
}
my_function()

my_sights <- my_function
my_sights()

RDocTaskForce/pkgcond documentation built on May 3, 2021, 9:42 a.m.