R/aitdista.R

Defines functions aitdista

Documented in aitdista

aitdista <- function(xnew, x, a, type = "euclidean", square = FALSE) {
  ## x contains the compositional data
  ## a is the power parameter, usually between -1 and 1
  y <- Compositional::ait(x, a, h = FALSE)
  ynew <- Compositional::ait(xnew, a, h = FALSE)
  Rfast::dista(ynew, y, type = type, square = square)
}

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.