Popis: |
Our vision regarding the use of metadata in a language like R is that having an implementation in it can help move the recording of metadata into the workflow of creating and managing data. Table structures, value domains, and transformations may be designed and captured during work in R. Implementing a structure for representing metadata in R may also create opportunities for operating directly on metadata. Set operators like “except” and “intersect” might be used against metadata to help harmonize categorical value domains. Differences in workflow processes, or panel waves might be visualized. DDI4 has been developed as a UML class model of common metadata items and their relationship. This model lends itself naturally to an object-oriented programming approach. A program can translate the online XMI representation of the model into a set of class definitions (object generators) in a language like R. This approach could eventually even become part of the formal production process of DDI4. Programmatic generation of the R representation from the platform independent expression of the model means that it can evolve along with DDI4 as it develops. Implementation of DDI4 in R can serve as an example for other languages with object oriented features, e.g. Java, Python, and Julia. It may also inform the structure of representation in formats like JSON. One question we will address is how permanently can metadata be affixed to data in R. Another is how well the encapsulated object model works with R. In R there is a distinction between a functional programming approach with immutable objects and an encapsulated (mutable) object approach. R aspires toward the former. DDI4 in R uses the latter. DDI objects are intended as persistent and globally unique, but are mutable as they are formed. We will discuss how these competing views work together. |