How data masking solves problem 1

Elevate the data environment

  • Objects are defined in their environment
  • Columns are defined in their data frame
  • To enable users to refer to columns as objects, data-masking functions must:
    • Change the search path for column names
    • Give the data environment priority

Disambiguate references

  • Suppose col is defined both in the global and data environment
  • How does one refer to the right col?
  • With pronouns
    • .data refers to column in the data environment
    • .env to an object in the global (parent) environment