WMD {opm}R Documentation

Virtual classes of the opm package

Description

Classes that are virtual and thus are not directly dealt with by an opm user: WMD, WMDS, FOE, OPMX and YAML_VIA_LIST.

Details

WMD is an acronym for ‘with metadata’. This is a virtual class facilitating the management of metadata. No objects can be created from it because metadata without data make not much sense. It is used by its child classes such as OPM.

Conceptually, this class treats metadata as arbitrarily nested lists with arbitrary content. Containers of objects that inherit from this class are not forced to contain the same metadata entries. Problems might arise if such data are queried and attempted to be converted to, e.g., data frames because some values might be missing. But metadata can be queried beforehand for the keys as well as the values they contain, and other methods support setting, modifying and deleting metadata.

For OPM and the other opm classes that use it, ‘metadata’ refers to information that, in contrast to, e.g., csv_data must be added by the user after reading OmniLog(R) CSV files. Metadata might already be present in YAML files created by the opm package, however.

WMDS is virtual class containing a collection of WMD objects (the name WMDS is just the plural of WMD). It shares many methods with WMD but they often return a collection of the return values of the according WMD method.

WMDX is the class union of WMD and WMDS.

FOE is an acronym for ‘formula or expression’. This is a virtual class facilitating the implementation of functionality for both formulae and expressions. Methods defined for objects from the class can be applied to either kind of object. See metadata.set and map_metadata for usage examples.

OPMX stands for ‘OPM or OPMS’. It is a virtual class containing helper methods mainly for plotting OPM and OPMS objects. See show and sort for usage examples.

Similarly, XOPMX unifies OPMS and MOPMX.

See to_yaml for a usage example of YAML_VIA_LIST. This is a virtual class facilitating the conversion to YAML format (or its subset, JSON). It can currently be used by any class that can be coerced to a list.

See Also

methods::Methods base::matrix base::array base::expression stats::formula

Other classes: MOPMX, OPM, OPMA, OPMA_DB, OPMD, OPMD_DB, OPMS, OPM_DB, OPM_MCP_OUT

Examples

showClass("WMD")
## Virtual Class "WMD" [package "opm"]
## 
## Slots:
##                
## Name:  metadata
## Class:     list
## 
## Extends: "WMDX"
## 
## Known Subclasses: 
## Class "OPM", directly
## Class "OPMA", by class "OPM", distance 2
## Class "OPMD", by class "OPMA", distance 3
showClass("WMDS")
## Virtual Class "WMDS" [package "opm"]
## 
## Slots:
##              
## Name:  plates
## Class:   list
## 
## Extends: "WMDX"
## 
## Known Subclasses: "OPMS"
showClass("OPMX")
## Virtual Class "OPMX" [package "opm"]
## 
## No Slots, prototype of class "OPM"
## 
## Known Subclasses: 
## Class "OPM", directly
## Class "OPMS", directly
## Class "OPMA", by class "OPM", distance 2
## Class "OPMD", by class "OPM", distance 3
showClass("XOPMX")
## Virtual Class "XOPMX" [package "opm"]
## 
## No Slots, prototype of class "MOPMX"
## 
## Known Subclasses: 
## Class "MOPMX", directly
## Class "OPMS", directly
## Class "OPM", directly
## Class "OPMA", by class "OPM", distance 2
## Class "OPMD", by class "OPM", distance 3
showClass("FOE")
## Virtual Class "FOE" [package "opm"]
## 
## No Slots, prototype of class "formula"
## 
## Known Subclasses: "formula", "expression"
showClass("YAML_VIA_LIST")
## Virtual Class "YAML_VIA_LIST" [package "opm"]
## 
## No Slots, prototype of class "OPM"
## 
## Known Subclasses: 
## Class "OPM", directly
## Class "OPMS", directly
## Class "print_easy", directly
## Class "OPMA", by class "OPM", distance 2
## Class "OPMD", by class "OPM", distance 3

[Package opm version 1.3.63 Index]