a <- 2
b <- 5
f <- function(x) x <- 0
ls()
x is not in the global environment since it is in the environment of the function f
environment()
pryr::where('f')
g <- function(y) {z <- y + 3}
g(3)
z # z is in the scope of the function
g <- function(y) {z <<- y + 3}
g(3)
z #now z is the global scope