R/archi.R

Defines functions archi

Documented in archi

archi <- function(dist,alpha)
{
    if (class(dist) != 'dist') {
        stop("You must pass an object 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'
    attr(out,'call') <- match.call()
    attr(out,'timestamp') <- date()
    out 
}

Try the optpart package in your browser

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

optpart documentation built on March 26, 2020, 6:18 p.m.