transpose_lazy_cost_spec: Swap left/right in a lazy cost spec

View source: R/matching_lazy.R

transpose_lazy_cost_specR Documentation

Swap left/right in a lazy cost spec

Description

A cheap metadata field-swap (left_mat <-> right_mat, n_left <-> n_right), unlike the dense path's t() matrix copy. Calipers/max_distance are unaffected: a caliper's var_index refers to a matching VARIABLE (a column shared by both sides), not a left/right unit index, so it does not need to change when the roles of left/right are swapped.

Usage

transpose_lazy_cost_spec(spec)

couplr documentation built on Sept. 17, 2026, 1:08 a.m.