2.6 Some Reserved Names

Generally you have freedom to name your data frames and your variables any way that you prefer. However, there are some common no-nos as listed below:

  • Words like FALSE/TRUE are reserved for testing logical variables.

  • Words like Inf, NaN, NA are reserved for outcomes such as whether a variable is negative or positive infinity, not a number, or missing.

  • If you build your own function (see Section 6.3), you would not want to name your function with something like mean or var that is built-into R. If you did, your function would override that in R.