I think you're worrying about something that doesn't require any worry.
The condition on which R will move out of the function environment to look for a variable is if the variable is not found in the list of arguments. If, however, there is a matching argument name, it will restrict itself to the function environment only.
The following is a trivial example, and shows that as long as y is an argument in the function, I can not inadvertently access the y in the global environment (at least not without undergoing shenanigans that probably ought to be avoided anyway)
y <- 7
add <- function(x, y){
x + y
}
add_danger <- function(x){
x + y
}
add(x = 3, y = y)
#> [1] 10
add(x = 3 ,y = 7)
#> [1] 10
add(x = 3) # without giving the `y` argument, I can't complete the function
#> Error in add(x = 3): argument "y" is missing, with no default
add_danger(x = 3) # since this has not `y` argument, R will look to the global environment to find it.
#> [1] 10
Created on 2018-08-01 by the reprex package (v0.2.0).