R/coda.R

Defines functions miniclo

Documented in miniclo

##' Closure operation
##'
##' @param X should be a D x N matrix, closes along the D dimension 
##' @return D x N matrix with columns summing to 1
##' @author Justin Silverman
miniclo <- function(X) {
   tot <- colSums(X)
   return(sweep(X, 2, tot, FUN="/"))
 }

Try the ALDEx3 package in your browser

Any scripts or data that you put into this service are public.

ALDEx3 documentation built on Oct. 20, 2026, 1:07 a.m.