R/diss.R

diss <- function (x, w=rep(1,ncol(x)))
  {
    n <- nrow(x)
    p <- ncol(x)
    if(length(w) != p)
      {
        warning("Error in dimention on either w or x")
        return(NULL)
      }
    
    res <- .C(C_diss,
              as.integer(x),
              double(n*n),
              n,p,
              as.double(w),
              PACKAGE="amap")

    matrix(res[[2]],n)

  }

Try the amap package in your browser

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

amap documentation built on Oct. 29, 2022, 1:06 a.m.