R/ilrInv.R

Defines functions ilrInv

Documented in ilrInv

#' Function to take inverse of ilr transform
#' 
#' @export
#' @param x balances
#' @param V balancing elements

ilrInv <- function(x,V){
  x <- t(x)
  M <- t(clo(t((exp(V %*% x)))))
  rownames(M) <- rownames(V)
  if (!is.null(nrow(x))){
    colnames(M) <- colnames(x)
  } else {
    colnames(M) <- names(x)
  }
  return(M)
}
reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.