CoDa.CompositionType
Composition(partscomps)
Composition(parts, comps)
Composition(part₁=comp₁, part₂=part₂, ...)
Composition(comps)
Composition(comp₁, comp₂, ...)

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 part1, part2, ..., partD:

julia> Composition(0.1, 0.8)
julia> Composition((0.1, 0.8))
Base.getpropertyMethod
getproperty(c, part)

Return the value of part in the composition c.

CoDa.alrMethod
alr(c)

Additive log-ratio transformation of composition c.

CoDa.alrinvMethod
alrinv(x)

Inverse alr for coordinates x.

CoDa.clrMethod
clr(c)

Centered log-ratio transformation of composition c.

CoDa.clrinvMethod
clrinv(x)

Inverse clr for coordinates x.

CoDa.composeMethod
compose(table, (:c1, c2, ..., :cn) [=> :coda])

Convert columns :c1, :c2, ..., :cn of table into parts of a composition and save it as a new column with name :coda.

Example

# create a new table with `:coda` column
compose(table, (:Cd, :Cu, :Pb))

# create a new table with `:comp` column
compose(table, (:Cd, :Cu, :Pb) => :comp)
CoDa.distanceMethod
distance(c₁, c₂)

Aitchison distance between compositions c₁ and c₂.

CoDa.ilrMethod
ilr(c)

Isometric log-ratio transformation of composition c.

CoDa.ilrinvMethod
ilrinv(x)

Inverse ilr for coordinates x.

CoDa.partsMethod
parts(c)

Parts in the composition c.

CoDa.readcodaMethod
readcoda(args...; codanames=nothing, kwargs...)

Read data from disk using CSV.read, optionally specifying the columns codanames with the parts of the composition. If nothing is specified, interpret all columns as parts.

The arguments args and keyword arguments kwargs are forwarded to the CSV.read function, please check their documentation for more details.

The option codanames can also be a pair as described in the documentation of compose.

CoDa.𝓒Method
𝓒(x)

Return closure of x.

LinearAlgebra.dotMethod
dot(c₁, c₂)

Inner product between compositions c₁ and c₂.