Whenever you learn a programming language, one of the very first questions you should have is "tell me about the scope". What does this mean? Generally, it is where does the language find variables that you use in your commands. For example, if we have the R command
d = data.frame(a = x, b = y)
what does this actually mean?