Skip to contents

Exchanges the upper and lower triangles of a clutch.

Usage

switch_sides(x)

Arguments

x

A clutch from breed().

Value

A clutch with upper / lower exchanged and their *_name slots swapped.

Examples

u <- matrix(1:6, 2, 3); l <- matrix(7:12, 2, 3)
breed(u, l, "obs", "pred") |> switch_sides()