#' @autoglobal
foo <- function(x) {
# bar isn't declared -> add to utils::globalVariables()
subset(x, bar == 4)
}
#' @global bar
foo <- function(x) {
# bar is explicitly defined as a global -> add to utils::globalVariables()
subset(x, bar == 4)
}
Run the code above in your browser using DataLab