Contents
provenance
Access an object's provenance record
Reads and writes the record of the call that produced a value: what was run, what the caller
supplied, and what the operation resolved. A bare value carries it as an attribute; a
PolyGeniusAssociation or PolyGeniusEvaluation carries it as a field.
provenance(x)returns the whole record,provenance(x, field)one field of it.provenance(x) <- valuereplaces the record,provenance(x, field) <- valuesets or removes one field, creating an empty record first when none exists.
Usage
provenance(x, field = NULL, ...)
provenance(x, field = NULL) <- valueDefault S3 method:
provenance(x, field = NULL, ...)Default S3 method:
provenance(x, field = NULL) <- valueS3 method for class 'PolyGeniusResult'
provenance(x, field = NULL, ...)S3 method for class 'PolyGeniusResult'
provenance(x, field = NULL) <- valueS3 method for class 'PGSLibrary'
provenance(x, field = NULL, ...)S3 method for class 'PolyGeniusStudy'
provenance(x, field = NULL, ...)Arguments
| Argument | Description |
|---|---|
x | An R object able to carry attributes, or a PolyGeniusResult, PGSLibrary or PolyGeniusStudy. |
field | Field name, default NULL. A single non-empty string; NULL addresses the whole record. |
... | Unused. Present for S3 method compatibility. |
value | A [PolyGeniusProvenance()](/reference/polygeniusprovenance/), a named list of fields (coerced to one), or NULL to drop the record. With a field, any value stored as that field, or NULL to remove it. Assigning onto a PGSLibrary or a PolyGeniusStudy aborts: those record how they were made when they are constructed, and an attribute written onto an R6 object would modify it by reference and be dropped by $clone(). |
Value
- Getter: the
PolyGeniusProvenancerecord, the value offield, orNULLwhen the record or the field is absent. Never a list of records -- one object carries at most one. - Setter:
xwith the record updated.
Examples
x <- list(a = 1)
provenance(x) <- PolyGeniusProvenance(name = "fit")
provenance(x)
provenance(x, "name")See Also
PolyGeniusProvenance(), artifacts(), diagnostics()
Other result-objects:
PolyGeniusAssociation(),
PolyGeniusEvaluation(),
PolyGeniusResult(),
artifacts(),
diagnostics(),
federate()