Diff of /R/mcarray.R [a16065] .. [44e5c7] Maximize Restore

  Switch to side-by-side view

--- a/R/mcarray.R
+++ b/R/mcarray.R
@@ -1,19 +1,20 @@
 print.mcarray <- function(x, ...)
 {
-    print(summary(x, mean))
+    summary(x, mean)
 }
    
 summary.mcarray <- function(x, FUN, ...)
 {
-    dn <- dimnames(x)
-    drop.dims <- names(dn) %in% c("iteration","chain")
-    y <- apply(x, which(!drop.dims), FUN)
-    cat("mcarray: FUN=", deparse(FUN))
+    dn <- names(dimnames(x))
+    drop.dims <- dn %in% c("iteration","chain")
+    y <- apply(x, which(!drop.dims), FUN, ...)
+    cat("mcarray:\n")
     print(y)
     if (any(drop.dims)) {
-        cat("Marginalizing over:", 
+        cat("\nMarginalizing over:", 
             paste(dn[drop.dims], "(", dim(x)[drop.dims],")\n" , sep=""))
     }
+    invisible(y)
 }