Learn R Programming

BORG (version 0.2.5)

plot.borg_result: Plot BORG Result Objects

Description

S3 plot method for borg_result objects from borg().

Usage

# S3 method for borg_result
plot(
  x,
  type = c("split", "risk", "temporal", "groups"),
  fold = 1,
  time = NULL,
  groups = NULL,
  title = NULL,
  ...
)

Value

Invisibly returns NULL. Called for plotting side effect.

Arguments

x

A borg_result object from borg().

type

Character. Plot type: "split" (default), "risk", "temporal", or "groups".

fold

Integer. Which fold to plot (for split visualization). Default: 1.

time

Column name or values for temporal plots.

groups

Column name or values for group plots.

title

Optional custom plot title.

...

Additional arguments passed to internal plot functions.

Examples

Run this code
set.seed(42)
data <- data.frame(
  x = runif(100, 0, 100),
  y = runif(100, 0, 100),
  response = rnorm(100)
)
result <- borg(data, coords = c("x", "y"), target = "response")
plot(result)  # Split visualization for first fold

Run the code above in your browser using DataLab