CoDa.Composition
— TypeComposition(symsparts)
Composition(syms, parts)
Composition(sym₁=val₁, sym₂=val₂, ...)
Composition(parts)
Composition(val₁, val₂, ...)
A D-part composition as defined by Aitchison 1986.
Examples
A 2-part composition with parts a=0.1
and b=0.8
:
julia> Composition(a=0.2, b=0.8)
julia> Composition((a=0.2, b=0.8))
julia> Composition((:a, :b), (0.2, 0.8))
When the names of the parts are not specified, the constructor uses default names part-1
, part-2
, ..., part-D
:
julia> Composition(0.1, 0.8)
julia> Composition((0.1, 0.8))
Base.names
— Methodnames(c)
Names of parts in the composition c
.
CoDa.alr
— Methodalr(c)
Additive log-ratio transformation of composition c
.
CoDa.alrinv
— Methodalrinv(x)
Inverse alr for coordinates x
.
CoDa.clr
— Methodclr(c)
Centered log-ratio transformation of composition c
.
CoDa.clrinv
— Methodclrinv(x)
Inverse clr for coordinates x
.
CoDa.compose
— Methodcompose(data, cols)
Convert columns cols
of tabular data
into parts of a composition.
CoDa.distance
— Methoddistance(c₁, c₂)
Aitchison distance between compositions c₁
and c₂
.
CoDa.ilr
— Methodilr(c)
Isometric log-ratio transformation of composition c
.
CoDa.ilrinv
— Methodilrinv(x)
Inverse ilr for coordinates x
.
CoDa.readcoda
— Methodreadcoda(args...; codanames=[], kwargs...)
Read data from disk using CSV.read
, optionally specifying the columns codanames
with compositional data.
The arguments args
and keyword arguments kwargs
are forwarded to the CSV.read
function, please check their documentation for more details.
This function returns a collection of Composition
objects whose parts are the columns codanames
in the file.
CoDa.𝓒
— Method𝓒(x)
Return closure of x
.
LinearAlgebra.dot
— Methoddot(c₁, c₂)
Inner product between compositions c₁
and c₂
.
LinearAlgebra.norm
— Methodnorm(c)
Aitchison norm of composition c
.