as_dist_structure: Coerce to dist_structure

View source: R/generics.R

as_dist_structure.dist_structureR Documentation

Coerce to dist_structure

Description

Wraps a plain algebraic.dist distribution in a 1-component series_dist so that it satisfies the dist_structure protocol. Useful for polymorphic code that operates on dist_structure inputs but is also handed unwrapped distributions. A dist_structure is returned unchanged.

Usage

## S3 method for class 'dist_structure'
as_dist_structure(x, ...)

## S3 method for class 'dist'
as_dist_structure(x, ...)

as_dist_structure(x, ...)

Arguments

x

A dist or dist_structure.

...

Reserved for methods.

Value

A dist_structure object.


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