R/archi.R

Defines functions archi

Documented in archi

archi <- function(dist,alpha)
{
    if (class(dist) != 'dist') {
        stop("You must pass an oject of class dist as the first argument")
    }
    y <- as.matrix(dist)
    clustering <- rep(0,nrow(y))
    tmp <- .Fortran("archi",
        as.double(y),
        as.double(alpha),
        clustering = as.integer(clustering),
        as.integer(nrow(y)),
        PACKAGE='optpart')
    out <- list(clustering=tmp$clustering)
    class(out) <- 'clustering'
    out 
}

Try the optpart package in your browser

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

optpart documentation built on May 2, 2019, 3:27 a.m.