R for Stata users

Substitute objects

In Stata, any part of the code can be substituted with macros. There are no macros in R: you cannot directly substitute some part of your code by enclosing it in special quotes. You can only substitute objects in R

Non Standard Evaluation

Some functions in R accept arguments that don't correspond to any object in the current environment. For instance, in the following code,

mutate(starwars, mean(height))

height does not point to an object in the global environment - it is the name of a column in the data.frame iris. R functions can capture their arguments without evaluating it : this is called Non Standard Evaluation.