substitute_component: Substitute a component

View source: R/generics.R

substitute_component.dist_structureR Documentation

Substitute a component

Description

Return a new dist_structure with the j-th component replaced by new_component. Topology is preserved; the returned object is a coherent_dist with the same min_paths and the modified component list.

Usage

## S3 method for class 'dist_structure'
substitute_component(x, j, new_component)

substitute_component(x, j, new_component)

Arguments

x

A dist_structure object.

j

Component index.

new_component

A dist-compatible object to install at position j.

Value

A new dist_structure object.


dist.structure documentation built on May 13, 2026, 1:07 a.m.