getGlobalsAndPackages(expr, envir = parent.frame(), tweak = tweakExpression, globals = TRUE, resolve = getOption("future.globals.resolve", FALSE), persistent = FALSE, ...)expr and tweak searching from environment envir. If FALSE, no globals are used. If a character vector, then globals are identified by lookup based their names globals searching from environment envir. If a named list or a Globals object, the globals are used as is.future.globals.onMissing == "error".expr (the tweaked expression), globals (a named list) and packages (a character string).
globalsOf() is used to identify globals and associated packages from the expression.