ilrvec: Internal function for computing an ilr balancing element...

View source: R/ilrvec.R

ilrvecR Documentation

Internal function for computing an ilr balancing element given a list of split taxa in and the total number of taxa

Description

Internal function for computing an ilr balancing element given a list of split taxa in and the total number of taxa

Usage

ilrvec(ix, n)

Arguments

ix

two-member list containing the parts split by a partition

n

total number of parts

Value

ILR basis element corresponding to the split of ix[[1]] with ix[[2]] out of n-part composition.

Examples

n <- 10
ix <- NULL
ix[[1]] <- c(3,4)
ix[[2]] <- c(5,6,7,8)
v1 <- ilrvec(ix,n)
sum(v1)

ix[[1]] <- c(5,6)
ix[[2]] <- c(7,8)
v2 <- ilrvec(ix,n)
sum(v2)
v1 %*% v2

reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.