File: print.npEM.R

package info (click to toggle)
r-cran-mixtools 2.0.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,944 kB
  • sloc: ansic: 781; makefile: 6
file content (19 lines) | stat: -rwxr-xr-x 504 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
print.npEM <- function(x, ...) {
  n <- NROW(x$data)
  r <- NCOL(x$data)  
  m <- length(x$lambdahat)
  cat(paste("Observations:", n, "\n"))
  cat(paste("Coordinates per observation:", r, "\n"))
  cat(paste("Mixture components:", m, "\n"))
  if (r>1) {
    B <- max(x$blockid)
    cat(paste("Blocks (of conditionally iid coordinates):", B, "\n\n"))
  }
  dp = match(c("data","posteriors", "lambda", "mu"), names(x), nomatch=0)
  print.default(structure(x[-dp], class=class(x)), ...)
  invisible(x)
}