slotArtifacts

Access the artifacts attribute group

Description

slotArtifacts() and its replacement form ⁠slotArtifacts<-()⁠ provide a semantic wrapper around slotAttributes(x, “artifacts”) for plot-support payloads.

Usage

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

slotArtifacts(x, field = NULL) <- value

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

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

Arguments

x

An R object.

field

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

Unused. Present for S3 compatibility.

value

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

Value

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

  • Setter: the modified object x.

See Also

slotAttributes(), PolyGeniusAttribute(), slotDiagnostics()

Examples

x <- list(a = 1)
slotArtifacts(x) <- list(roc = data.frame(fpr = c(0, 1), tpr = c(0, 1)))
slotArtifacts(x)
slotArtifacts(x, roc)