slotDiagnostics

Access the diagnostics attribute group

Description

slotDiagnostics() and its replacement form ⁠slotDiagnostics<-()⁠ provide a semantic wrapper around slotAttributes(x, “diagnostics”) for diagnostics payloads.

Usage

slotDiagnostics(x, field = NULL, ...)

slotDiagnostics(x, field = NULL) <- value

## Default S3 method:
slotDiagnostics(x, field = NULL, ...)

## Default S3 replacement method:
slotDiagnostics(x, field = NULL) <- value

Arguments

x

An R object.

field

Optional diagnostics name. May be NULL, a symbol, or a single non-empty character string.

Unused. Present for S3 compatibility.

value

Replacement value for the full diagnostics attribute group or a single named diagnostics entry. Setting a named entry to NULL removes it.

Value

  • Getter: a “PolyGeniusAttribute” object, one diagnostics entry, or NULL.

  • Setter: the modified object x.

See Also

slotAttributes(), PolyGeniusAttribute(), slotArtifacts()

Examples

x <- list(a = 1)
slotDiagnostics(x) <- list(metric.flags = data.frame(metric = "auc", flag = "ok"))
slotDiagnostics(x)
slotDiagnostics(x, "metric.flags")