tests/testthat/mod/nested/rel_import.r

box::use(utils[tail])

#' @export
global_path = tail(box:::mod_search_path(environment()), 1L)

#' @export
path_in_fun = function () {
    tail(box:::mod_search_path(environment()), 1L)
}

#' @export
path_in_nested_fun = function () {
    f = function () {
        tail(box:::mod_search_path(environment()), 1L)
    }
    f()
}

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.