Combines two matrices into a clutch: aligns them on overlapping row /
column names when both carry dimnames, computes a compact set of
comparison statistics (Pearson and Spearman correlations, RMSE, MAE, NA
counts, value ranges), and stores the aligned matrices alongside a tidy
long form. The result is the canonical BiHeat input — pass it to
incubate() to set rendering options and then to plot() to draw, or
straight to plot() (or biheat()) for defaults.
Usage
breed(
a,
b,
upper_name = NULL,
lower_name = NULL,
align = c("intersect", "by_position")
)Arguments
- a, b
Matrices (or objects coercible via
as.matrix()).ais drawn in the upper triangle,bin the lower triangle.- upper_name, lower_name
Optional labels. When
NULL, BiHeat reads the symbol names you passed in viasubstitute(), sobreed(observed, predicted)records"observed"and"predicted"automatically.- align
"intersect"(default) or"by_position".
Value
A clutch: a list with upper, lower, data, meta,
align, align_report, upper_name, lower_name, config.
Details
Alignment rules (align = "intersect", the default):
Both matrices carry rownames and colnames: take the intersection on each side. The clutch remembers which rows / columns were dropped.
Only one side carries names on a given axis, or neither does: that axis is aligned by position, which requires identical length.
No overlap on a named axis: error.
Pass align = "by_position" to skip the name-based logic entirely and
require identical shape.