SourceForge has been redesigned. Learn more.
Close

[44e5c7]: / R / mcarray.R  Maximize  Restore  History

Download this file

21 lines (17 with data), 432 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
print.mcarray <- function(x, ...)
{
summary(x, mean)
}
summary.mcarray <- function(x, 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("\nMarginalizing over:",
paste(dn[drop.dims], "(", dim(x)[drop.dims],")\n" , sep=""))
}
invisible(y)
}