inst/doc/mod-env-hierarchy.R

## ----eval = FALSE-------------------------------------------------------------
#  #' @export
#  f = function () 'c$f'

## ----eval = FALSE-------------------------------------------------------------
#  #' @export
#  f = function () 'b$f'
#  
#  g = function () 'b$g'

## ----eval = FALSE-------------------------------------------------------------
#  #' @export
#  box::use(./b[g = f, ...])
#  
#  box::use(./c[...])
#  
#  #' @export
#  box::use(./c)
#  
#  #' @export
#  f = function () 'a$f'
#  
#  f_of_c1 = c$f
#  f_of_c2 = get('f', parent.env(environment()))
#  stopifnot(identical(f_of_c1, f_of_c2))

## ----eval = FALSE-------------------------------------------------------------
#  box::use(a = ./a[f, g])

Try the box package in your browser

Any scripts or data that you put into this service are public.

box documentation built on May 2, 2023, 9:14 a.m.