What are the double colons (::) in R?

As you probably have looked up the help page by now usage of :: helps to access the exact function from that specific package. When you load dplyr you probably got a message as follows.. So, for instance, if you would like to use intersect function from dplyr or base package, you need to specify using the :: double colons. Usage will be … Read more

What is lexical scope?

I understand them through examples. 🙂 First, lexical scope (also called static scope), in C-like syntax: Every inner level can access its outer levels. There is another way, called dynamic scope used by the first implementation of Lisp, again in a C-like syntax: Here fun can either access x in dummy1 or dummy2, or any x in any function that call fun with x declared in it. will print 5, will print 10. The … Read more