PolyGeniusAttribute

Create a PolyGeniusAttribute object

Description

PolyGeniusAttribute() constructs a lightweight, list-based S3 object for arbitrary named metadata entries attached to PolyGenius objects.

The object itself is a list, not a wrapper around one, and carries a required type metadata field used for printing and downstream semantics.

Usage

PolyGeniusAttribute(type, ...)

## S3 method for class 'PolyGeniusAttribute'
print(x, ...)

Arguments

type

Character scalar describing the attribute type.

Additional named entries when constructing, or a single named list. Unused by the print method.

x

An object of class “PolyGeniusAttribute”.

Details

PolyGeniusAttribute is the shared base class used by grouped metadata payloads such as log, artifact, and diagnostics accessors. Unknown fields are preserved and no domain-specific validation is imposed beyond requiring that entries are named.

Value

An object of S3 class “PolyGeniusAttribute” (a named list).

Invisibly returns x.

See Also

slotAttributes(), slotLog(), slotArtifacts(), slotDiagnostics(), PolyGeniusLogAttribute()

Examples

PolyGeniusAttribute(
  type = "artifacts",
  roc = data.frame(fpr = c(0, 1), tpr = c(0, 1)),
  confusion = data.frame(threshold = 0.5, tp = 10)
)