# NOT RUN {
b <- 2
expr <- substitute({ a <- b; b <- 1 })
## Will _not_ identify 'b' (because it's also a local)
globalsC <- globalsOf(expr, method = "conservative")
print(globalsC)
## Will identify 'b'
globalsL <- globalsOf(expr, method = "liberal")
print(globalsL)
# }
Run the code above in your browser using DataLab