first compile and load the program from UNIX do-actaully issue this command inside Splus given the syntax here > !Splus COMPILE maxkapS1.c then in Splus do > print(dyn.load("maxkapS1.o")) then just supply a data matrix (need more than 5 clusters for the program to work as written) > mm _ maxkappa(cldata[,1:3]) this returns the non-diagonal elements of the max kappa matrix here is the S-Plus function > maxkappa function(datMat) { ncl <- as.integer(dim(table(datMat[, 1]))) if(ncl < 5) { cat("too few clusters") res <- 0 } else { nunits <- as.integer(dim(datMat)[1]) nmeth <- as.integer(dim(datMat)[2]) ans <- c(1:c((nmeth * (nmeth - 1))/2)) storage.mode(datMat) <- "single" storage.mode(ans) <- "single" res <- .C("clustComp", ans = ans, datMat, nunits, nmeth, ncl)$ans } res } and you need the file maxkapS1.c in the directory from which you run Splus