R/print.mvdapca.R

Defines functions print.mvdapca

Documented in print.mvdapca

print.mvdapca <- function (x, ...)
{
  nobj <- nrow(x$scores)
  nvars <- ncol(x$Xdata)
  cat("Principal Component Analysis\n")
  cat("\nFit Summary: \nNumber of objects =", nobj, "\nNumber of Variables =",
      nvars)
  cat("\nPercent Variation Explained:\n")
  print(round(x$Percents.Explained, 3))
  cat("\nCross-Validation Results:\n")
  print(data.frame(PRESS = round(x$CV, 3)))
  cat("\nEigenvalues:\n")
  if(length(x$D) == 1) {
    print(round(x$D, 3))
  } else {
    print(round(diag(x$D), 3))
  }
}

Try the mvdalab package in your browser

Any scripts or data that you put into this service are public.

mvdalab documentation built on Nov. 17, 2017, 6 a.m.