R/pow.R

Defines functions pow

Documented in pow

pow <- function(x, a) {

  if ( is.vector(a) ) {
    z <- Rfast::eachrow(x, a, oper = "^")
  } else z <- x^a

  z / Rfast::rowsums(z)
}

Try the Compositional package in your browser

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

Compositional documentation built on Oct. 9, 2024, 5:10 p.m.