For example:

a <- 1

f <- function(b){
    return(a+b)
}


when we call function f(2), r will search the local environment first, if
it cannot find a, it will search global environment, and return 3. How to
avoid r searching the global environment and return an error when we call
this function?

Thanks.

	[[alternative HTML version deleted]]

