R/matddlppar.R

Defines functions matddlppar

Documented in matddlppar

matddlppar <-
function(freq, p = 1)  {
  # Computing of the distances  
  distances = diag(0, nrow = length(freq))
  dimnames(distances) = list(names(freq), names(freq))

  for (i in 2:length(freq))  for (j in 1:(i-1))  {
      distances[i, j] = distances[j, i] = ddlppar(freq[[i]], freq[[j]], p = p)
    }
  as.dist(distances)
}

Try the dad package in your browser

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

dad documentation built on Aug. 30, 2023, 5:06 p.m.