close
Warning:
Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.
File ClusterUtils.r, 491 bytes (added by Jorge, 13 years ago) |
|
Line | |
---|
1 | require(cluster) |
---|
2 | |
---|
3 | Hclust.TOL <- function( dist.bbm, args.R ) |
---|
4 | { |
---|
5 | # print( "running Hclust.TOL" ); |
---|
6 | dist <- as.dist( read.bbm( dist.bbm ) ) |
---|
7 | # Eval non-binary arguments |
---|
8 | source( args.R, local=TRUE ) |
---|
9 | m = Hclust_args$method |
---|
10 | size = Hclust_args$size |
---|
11 | hclustResult <- hclust( dist, m ); |
---|
12 | groups = cutree( hclustResult, k = size ) |
---|
13 | # Write the result |
---|
14 | # print( paste( "writing '", Hclust_args$result.bbm, "'" ) ) |
---|
15 | write.bbm( Hclust_args$result.bbm, groups ) |
---|
16 | } |
---|
Download in other formats: