tests/testthat/modules/issue76.r

f = function() {
    import('a', attach = TRUE)
    helper()
}

g = function() {
    import('a', attach = FALSE, attach_operators = FALSE)
    helper()
}

h = function() {
    import('a', attach = FALSE, attach_operators = TRUE)
    helper()
}

helper_var = 0

helper = function() { helper_var <<- helper_var + 1 }

f()
g()
h()
klmr/modules documentation built on Feb. 3, 2021, 3:24 a.m.