[Zooimage-commits] r214 - pkg/zooimage/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 26 16:22:55 CEST 2012


Author: kevin
Date: 2012-06-26 16:22:55 +0200 (Tue, 26 Jun 2012)
New Revision: 214

Modified:
   pkg/zooimage/R/ZIConf.R
Log:
Solve bug in confusionHclust

Modified: pkg/zooimage/R/ZIConf.R
===================================================================
--- pkg/zooimage/R/ZIConf.R	2012-06-26 12:06:10 UTC (rev 213)
+++ pkg/zooimage/R/ZIConf.R	2012-06-26 14:22:55 UTC (rev 214)
@@ -178,14 +178,14 @@
     if(is.null(ZIConf)){
         Confu <- ZIConf(ZIClass)
     } else {
-	   Confu <- ZIConf
+        Confu <- ZIConf
     }
     # Transform it in symetric confusion matrix
     ConfuSim <- Confu + t(Confu)
     ConfuSim <- max(ConfuSim) - ConfuSim
     # Create the structure of a "dist" object
-    confuDist <- structure(confuSim[lower.tri(confuSim)],
-        Size = nrow(confu),
+    ConfuDist <- structure(ConfuSim[lower.tri(ConfuSim)],
+        Size = nrow(Confu),
         Diag = FALSE,
         Upper = FALSE,
         method = "confusion",
@@ -193,8 +193,8 @@
         class = "dist"
     )
     # method :"ward", "single", "complete", "average", "mcquitty", "median" or "centroid"
-    HC <- hclust(confuDist, method = "ward")
-    plot(HC, labels = rownames(confu))
+    HC <- hclust(ConfuDist, method = "ward")
+    plot(HC, labels = rownames(Confu))
     return(invisible(HC))
 }
 



More information about the Zooimage-commits mailing list